summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kokshaysky <ink@jurassic.park.msu.ru>2008-01-06 20:27:32 +0200
committerAdrian Bunk <bunk@kernel.org>2008-01-06 20:27:32 +0200
commitf150bd4a52f5793813c92e9364195ccb8670d926 (patch)
treec482b7283dd830be31bafad9586d9ce6024a7552
parent5306cc0478da7d778f8f43e1b9931a52ba541cfc (diff)
include/asm-alpha/io_trivial.h build fixes
This patch cherry picks the following from commit 9548b209a37397f3036aa5bd3d5b4d3b725aa1: fix build failure with gcc-4.2.x: fix up casts in cia_io* routines to avoid warnings ('discards qualifiers from pointer target type'), which are failures, thanks to -Werror; Signed-off-by: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Signed-off-by: Adrian Bunk <bunk@kernel.org>
-rw-r--r--include/asm-alpha/io_trivial.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/include/asm-alpha/io_trivial.h b/include/asm-alpha/io_trivial.h
index b10d1aa4cdd1..1c77f10b4b36 100644
--- a/include/asm-alpha/io_trivial.h
+++ b/include/asm-alpha/io_trivial.h
@@ -72,25 +72,29 @@ IO_CONCAT(__IO_PREFIX,writew)(u16 b, volatile void __iomem *a)
__EXTERN_INLINE u8
IO_CONCAT(__IO_PREFIX,readb)(const volatile void __iomem *a)
{
- return IO_CONCAT(__IO_PREFIX,ioread8)((void __iomem *)a);
+ void __iomem *addr = (void __iomem *)a;
+ return IO_CONCAT(__IO_PREFIX,ioread8)(addr);
}
__EXTERN_INLINE u16
IO_CONCAT(__IO_PREFIX,readw)(const volatile void __iomem *a)
{
- return IO_CONCAT(__IO_PREFIX,ioread16)((void __iomem *)a);
+ void __iomem *addr = (void __iomem *)a;
+ return IO_CONCAT(__IO_PREFIX,ioread16)(addr);
}
__EXTERN_INLINE void
IO_CONCAT(__IO_PREFIX,writeb)(u8 b, volatile void __iomem *a)
{
- IO_CONCAT(__IO_PREFIX,iowrite8)(b, (void __iomem *)a);
+ void __iomem *addr = (void __iomem *)a;
+ IO_CONCAT(__IO_PREFIX,iowrite8)(b, addr);
}
__EXTERN_INLINE void
IO_CONCAT(__IO_PREFIX,writew)(u16 b, volatile void __iomem *a)
{
- IO_CONCAT(__IO_PREFIX,iowrite16)(b, (void __iomem *)a);
+ void __iomem *addr = (void __iomem *)a;
+ IO_CONCAT(__IO_PREFIX,iowrite16)(b, addr);
}
#endif