summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2013-06-19 06:49:30 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-06-19 23:30:32 -0400
commitc2955da0e101c3432ae21945e5d77786adf1f094 (patch)
tree7d20a487bd2fd00c7876d48d21e4dbd3d96555c8
parente42d50baf43120a78985f13f6e9c8f92fae091c2 (diff)
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: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/fmc/fmc-fakedev.c4
-rw-r--r--include/linux/fmc.h12
2 files changed, 8 insertions, 8 deletions
diff --git a/drivers/fmc/fmc-fakedev.c b/drivers/fmc/fmc-fakedev.c
index bec94ac0764c..941d0930969a 100644
--- a/drivers/fmc/fmc-fakedev.c
+++ b/drivers/fmc/fmc-fakedev.c
@@ -232,8 +232,8 @@ static int ff_validate(struct fmc_device *fmc, struct fmc_driver *drv)
232 232
233 233
234static struct fmc_operations ff_fmc_operations = { 234static struct fmc_operations ff_fmc_operations = {
235 .readl = ff_readl, 235 .read32 = ff_readl,
236 .writel = ff_writel, 236 .write32 = ff_writel,
237 .reprogram = ff_reprogram, 237 .reprogram = ff_reprogram,
238 .irq_request = ff_irq_request, 238 .irq_request = ff_irq_request,
239 .read_ee = ff_read_ee, 239 .read_ee = ff_read_ee,
diff --git a/include/linux/fmc.h b/include/linux/fmc.h
index a3c498503983..a5f0aa5c2a8d 100644
--- a/include/linux/fmc.h
+++ b/include/linux/fmc.h
@@ -129,8 +129,8 @@ struct fmc_gpio {
129 * the exception. 129 * the exception.
130 */ 130 */
131struct fmc_operations { 131struct fmc_operations {
132 uint32_t (*readl)(struct fmc_device *fmc, int offset); 132 uint32_t (*read32)(struct fmc_device *fmc, int offset);
133 void (*writel)(struct fmc_device *fmc, uint32_t value, int offset); 133 void (*write32)(struct fmc_device *fmc, uint32_t value, int offset);
134 int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv); 134 int (*validate)(struct fmc_device *fmc, struct fmc_driver *drv);
135 int (*reprogram)(struct fmc_device *f, struct fmc_driver *d, char *gw); 135 int (*reprogram)(struct fmc_device *f, struct fmc_driver *d, char *gw);
136 int (*irq_request)(struct fmc_device *fmc, irq_handler_t h, 136 int (*irq_request)(struct fmc_device *fmc, irq_handler_t h,
@@ -194,14 +194,14 @@ struct fmc_device {
194 */ 194 */
195static inline uint32_t fmc_readl(struct fmc_device *fmc, int offset) 195static inline uint32_t fmc_readl(struct fmc_device *fmc, int offset)
196{ 196{
197 if (unlikely(fmc->op->readl)) 197 if (unlikely(fmc->op->read32))
198 return fmc->op->readl(fmc, offset); 198 return fmc->op->read32(fmc, offset);
199 return readl(fmc->fpga_base + offset); 199 return readl(fmc->fpga_base + offset);
200} 200}
201static inline void fmc_writel(struct fmc_device *fmc, uint32_t val, int off) 201static inline void fmc_writel(struct fmc_device *fmc, uint32_t val, int off)
202{ 202{
203 if (unlikely(fmc->op->writel)) 203 if (unlikely(fmc->op->write32))
204 fmc->op->writel(fmc, val, off); 204 fmc->op->write32(fmc, val, off);
205 else 205 else
206 writel(val, fmc->fpga_base + off); 206 writel(val, fmc->fpga_base + off);
207} 207}