forked from luck/tmp_suning_uos_patched
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: 99082eab63
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>
This commit is contained in:
parent
94ab599076
commit
9555b47fab
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user