]> git.baikalelectronics.ru Git - kernel.git/commit
sparc: io_64.h: Replace io function-link macros
authorRicardo Ribalda <ricardo.ribalda@gmail.com>
Thu, 29 Jan 2015 14:52:02 +0000 (15:52 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2015 05:48:22 +0000 (21:48 -0800)
commitf7ba2e2dcadf49dd06df9cc2ee865fa779b70d28
tree86947a615ea0b909bc002519101c13896e7ce0d8
parent878a07e3815504bcdb9f0bfec36d49e7eebd59ac
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: 822866cc105e38e8 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>
arch/sparc/include/asm/io_64.h