From 0dd4d5cbe4c38165dc9b3ad329ebb23f24d74fdb Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Mon, 15 Oct 2012 14:08:48 +0900 Subject: sh: Fix up more fallout from pointless ARM __iomem churn. It was already pointed out how to fix these cases before the offending patches were merged, but unsurprisingly, that didn't happen. As this change is entirely superfluous to begin with, simply shut things up by casting everything away. Signed-off-by: Paul Mundt --- drivers/sh/intc/access.c | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'drivers/sh/intc/access.c') diff --git a/drivers/sh/intc/access.c b/drivers/sh/intc/access.c index f892ae1d212a..114390f967d2 100644 --- a/drivers/sh/intc/access.c +++ b/drivers/sh/intc/access.c @@ -75,54 +75,61 @@ unsigned long intc_get_field_from_handle(unsigned int value, unsigned int handle static unsigned long test_8(unsigned long addr, unsigned long h, unsigned long ignore) { - return intc_get_field_from_handle(__raw_readb(addr), h); + void __iomem *ptr = (void __iomem *)addr; + return intc_get_field_from_handle(__raw_readb(ptr), h); } static unsigned long test_16(unsigned long addr, unsigned long h, unsigned long ignore) { - return intc_get_field_from_handle(__raw_readw(addr), h); + void __iomem *ptr = (void __iomem *)addr; + return intc_get_field_from_handle(__raw_readw(ptr), h); } static unsigned long test_32(unsigned long addr, unsigned long h, unsigned long ignore) { - return intc_get_field_from_handle(__raw_readl(addr), h); + void __iomem *ptr = (void __iomem *)addr; + return intc_get_field_from_handle(__raw_readl(ptr), h); } static unsigned long write_8(unsigned long addr, unsigned long h, unsigned long data) { - __raw_writeb(intc_set_field_from_handle(0, data, h), addr); - (void)__raw_readb(addr); /* Defeat write posting */ + void __iomem *ptr = (void __iomem *)addr; + __raw_writeb(intc_set_field_from_handle(0, data, h), ptr); + (void)__raw_readb(ptr); /* Defeat write posting */ return 0; } static unsigned long write_16(unsigned long addr, unsigned long h, unsigned long data) { - __raw_writew(intc_set_field_from_handle(0, data, h), addr); - (void)__raw_readw(addr); /* Defeat write posting */ + void __iomem *ptr = (void __iomem *)addr; + __raw_writew(intc_set_field_from_handle(0, data, h), ptr); + (void)__raw_readw(ptr); /* Defeat write posting */ return 0; } static unsigned long write_32(unsigned long addr, unsigned long h, unsigned long data) { - __raw_writel(intc_set_field_from_handle(0, data, h), addr); - (void)__raw_readl(addr); /* Defeat write posting */ + void __iomem *ptr = (void __iomem *)addr; + __raw_writel(intc_set_field_from_handle(0, data, h), ptr); + (void)__raw_readl(ptr); /* Defeat write posting */ return 0; } static unsigned long modify_8(unsigned long addr, unsigned long h, unsigned long data) { + void __iomem *ptr = (void __iomem *)addr; unsigned long flags; unsigned int value; local_irq_save(flags); - value = intc_set_field_from_handle(__raw_readb(addr), data, h); - __raw_writeb(value, addr); - (void)__raw_readb(addr); /* Defeat write posting */ + value = intc_set_field_from_handle(__raw_readb(ptr), data, h); + __raw_writeb(value, ptr); + (void)__raw_readb(ptr); /* Defeat write posting */ local_irq_restore(flags); return 0; } @@ -130,12 +137,13 @@ static unsigned long modify_8(unsigned long addr, unsigned long h, static unsigned long modify_16(unsigned long addr, unsigned long h, unsigned long data) { + void __iomem *ptr = (void __iomem *)addr; unsigned long flags; unsigned int value; local_irq_save(flags); - value = intc_set_field_from_handle(__raw_readw(addr), data, h); - __raw_writew(value, addr); - (void)__raw_readw(addr); /* Defeat write posting */ + value = intc_set_field_from_handle(__raw_readw(ptr), data, h); + __raw_writew(value, ptr); + (void)__raw_readw(ptr); /* Defeat write posting */ local_irq_restore(flags); return 0; } @@ -143,12 +151,13 @@ static unsigned long modify_16(unsigned long addr, unsigned long h, static unsigned long modify_32(unsigned long addr, unsigned long h, unsigned long data) { + void __iomem *ptr = (void __iomem *)addr; unsigned long flags; unsigned int value; local_irq_save(flags); - value = intc_set_field_from_handle(__raw_readl(addr), data, h); - __raw_writel(value, addr); - (void)__raw_readl(addr); /* Defeat write posting */ + value = intc_set_field_from_handle(__raw_readl(ptr), data, h); + __raw_writel(value, ptr); + (void)__raw_readl(ptr); /* Defeat write posting */ local_irq_restore(flags); return 0; } -- cgit v1.2.3