diff options
author | Ricardo Ribalda <ricardo.ribalda@gmail.com> | 2015-01-29 15:52:02 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-03-01 21:48:22 -0800 |
commit | 9555b47fab149ee23bddc842c264dd6f3b51f52d (patch) | |
tree | 86947a615ea0b909bc002519101c13896e7ce0d8 /arch/sparc | |
parent | 94ab5990760a54bb1f0fca99e0d374260cae3b8b (diff) | |
download | blackbird-op-linux-9555b47fab149ee23bddc842c264dd6f3b51f52d.tar.gz blackbird-op-linux-9555b47fab149ee23bddc842c264dd6f3b51f52d.zip |
sparc: io_64.h: Replace io function-link macros
Function like macros cannot be assigned to function pointers. This patch
convert the function-like macros into object-macros, that the
precompiler will replace with the name of the final function.
With this patch this kind of code will work:
if (priv->mode_big_endian)
priv.read = ioread32be;
else
priv.read = ioread32;
Same approach has been taken on asm-generic/io.h
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Fixes: 99082eab63449f9d spi/xilinx: Remove iowrite/ioread wrappers
Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/include/asm/io_64.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/sparc/include/asm/io_64.h b/arch/sparc/include/asm/io_64.h index 9b672be70dda..50d4840d9aeb 100644 --- a/arch/sparc/include/asm/io_64.h +++ b/arch/sparc/include/asm/io_64.h @@ -407,16 +407,16 @@ static inline void iounmap(volatile void __iomem *addr) { } -#define ioread8(X) readb(X) -#define ioread16(X) readw(X) -#define ioread16be(X) __raw_readw(X) -#define ioread32(X) readl(X) -#define ioread32be(X) __raw_readl(X) -#define iowrite8(val,X) writeb(val,X) -#define iowrite16(val,X) writew(val,X) -#define iowrite16be(val,X) __raw_writew(val,X) -#define iowrite32(val,X) writel(val,X) -#define iowrite32be(val,X) __raw_writel(val,X) +#define ioread8 readb +#define ioread16 readw +#define ioread16be __raw_readw +#define ioread32 readl +#define ioread32be __raw_readl +#define iowrite8 writeb +#define iowrite16 writew +#define iowrite16be __raw_writew +#define iowrite32 writel +#define iowrite32be __raw_writel /* Create a virtual mapping cookie for an IO port range */ void __iomem *ioport_map(unsigned long port, unsigned int nr); |