Commit 27e6b003 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Alessandro Rubini

fmc: avoid readl/writel namespace conflict

The use of the 'readl' and 'writel' identifiers here causes build errors on
architectures where those are macros. This renames the fields to read32/write32
to avoid the problem.
Reported-by: 's avatarkbuild test robot <fengguang.wu@intel.com>
Signed-off-by: 's avatarArnd Bergmann <arnd@arndb.de>
Acked-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
Signed-off-by: 's avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e7795122
...@@ -226,8 +226,8 @@ static int ff_validate(struct fmc_device *fmc, struct fmc_driver *drv) ...@@ -226,8 +226,8 @@ static int ff_validate(struct fmc_device *fmc, struct fmc_driver *drv)
static struct fmc_operations ff_fmc_operations = { static struct fmc_operations ff_fmc_operations = {
.readl = ff_readl, .read32 = ff_readl,
.writel = ff_writel, .write32 = ff_writel,
.reprogram = ff_reprogram, .reprogram = ff_reprogram,
.irq_request = ff_irq_request, .irq_request = ff_irq_request,
.read_ee = ff_read_ee, .read_ee = ff_read_ee,
......
...@@ -129,8 +129,8 @@ struct fmc_gpio { ...@@ -129,8 +129,8 @@ struct fmc_gpio {
* the exception. * the exception.
*/ */
struct fmc_operations { struct fmc_operations {
uint32_t (*readl)(struct fmc_device *fmc, int offset); uint32_t (*read32)(struct fmc_device *fmc, int offset);
void (*writel)(struct fmc_device *fmc, uint32_t value, int offset); void (*write32)(struct fmc_device *fmc, uint32_t value, int offset);
int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv); int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv);
int (*reprogram)(struct fmc_device *f, struct fmc_driver *d, char *gw); int (*reprogram)(struct fmc_device *f, struct fmc_driver *d, char *gw);
int (*irq_request)(struct fmc_device *fmc, irq_handler_t h, int (*irq_request)(struct fmc_device *fmc, irq_handler_t h,
...@@ -194,14 +194,14 @@ struct fmc_device { ...@@ -194,14 +194,14 @@ struct fmc_device {
*/ */
static inline uint32_t fmc_readl(struct fmc_device *fmc, int offset) static inline uint32_t fmc_readl(struct fmc_device *fmc, int offset)
{ {
if (unlikely(fmc->op->readl)) if (unlikely(fmc->op->read32))
return fmc->op->readl(fmc, offset); return fmc->op->read32(fmc, offset);
return readl(fmc->fpga_base + offset); return readl(fmc->fpga_base + offset);
} }
static inline void fmc_writel(struct fmc_device *fmc, uint32_t val, int off) static inline void fmc_writel(struct fmc_device *fmc, uint32_t val, int off)
{ {
if (unlikely(fmc->op->writel)) if (unlikely(fmc->op->write32))
fmc->op->writel(fmc, val, off); fmc->op->write32(fmc, val, off);
else else
writel(val, fmc->fpga_base + off); writel(val, fmc->fpga_base + off);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment