diff options
author | James Hogan <james.hogan@imgtec.com> | 2011-06-24 13:56:38 +0100 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2011-07-20 17:20:59 -0400 |
commit | 892b1e312b179139026e366a9d70065a7f897dbc (patch) | |
tree | 348484eed378f9b367ce75ac9d12513046a4829a /drivers | |
parent | 1791b13ea4d97a6a7c162edd54485e932ad92f1b (diff) |
mmc: dw_mmc: brackets in register access macros
Add brackets around use of the dev argument to the
mci_{read,write}{w,l,q}() macros, for extra safety.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Will Newton <will.newton@imgtec.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/dw_mmc.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/mmc/host/dw_mmc.h b/drivers/mmc/host/dw_mmc.h index 23c662af5616..bb9e5de76ae9 100644 --- a/drivers/mmc/host/dw_mmc.h +++ b/drivers/mmc/host/dw_mmc.h @@ -134,22 +134,22 @@ /* Register access macros */ #define mci_readl(dev, reg) \ - __raw_readl(dev->regs + SDMMC_##reg) + __raw_readl((dev)->regs + SDMMC_##reg) #define mci_writel(dev, reg, value) \ - __raw_writel((value), dev->regs + SDMMC_##reg) + __raw_writel((value), (dev)->regs + SDMMC_##reg) /* 16-bit FIFO access macros */ #define mci_readw(dev, reg) \ - __raw_readw(dev->regs + SDMMC_##reg) + __raw_readw((dev)->regs + SDMMC_##reg) #define mci_writew(dev, reg, value) \ - __raw_writew((value), dev->regs + SDMMC_##reg) + __raw_writew((value), (dev)->regs + SDMMC_##reg) /* 64-bit FIFO access macros */ #ifdef readq #define mci_readq(dev, reg) \ - __raw_readq(dev->regs + SDMMC_##reg) + __raw_readq((dev)->regs + SDMMC_##reg) #define mci_writeq(dev, reg, value) \ - __raw_writeq((value), dev->regs + SDMMC_##reg) + __raw_writeq((value), (dev)->regs + SDMMC_##reg) #else /* * Dummy readq implementation for architectures that don't define it. @@ -160,9 +160,9 @@ * rest of the code free from ifdefs. */ #define mci_readq(dev, reg) \ - (*(volatile u64 __force *)(dev->regs + SDMMC_##reg)) + (*(volatile u64 __force *)((dev)->regs + SDMMC_##reg)) #define mci_writeq(dev, reg, value) \ - (*(volatile u64 __force *)(dev->regs + SDMMC_##reg) = value) + (*(volatile u64 __force *)((dev)->regs + SDMMC_##reg) = (value)) #endif #endif /* _DW_MMC_H_ */ |