diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2011-11-09 10:47:21 +0800 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2011-11-14 13:34:29 +0800 |
commit | 22f4cb4bd06db14912f69039917422fe0c5b11fb (patch) | |
tree | 6bcd9d72a9f1c82a58ee4815e62cd901ecd8d543 | |
parent | c0a39151a4055332897cba615623d3de2f3896df (diff) | |
download | blackbird-op-linux-22f4cb4bd06db14912f69039917422fe0c5b11fb.tar.gz blackbird-op-linux-22f4cb4bd06db14912f69039917422fe0c5b11fb.zip |
ARM: mmp: fix build error on gpio
Parameters of GPIO_REG() should be assigned as volatile.
arch/arm/plat-pxa/include/plat/gpio.h: In function ‘gpio_get_value’:
arch/arm/plat-pxa/include/plat/gpio.h:12:21: error: invalid operands to
binary & (have ‘void *’ and ‘int’)
arch/arm/plat-pxa/include/plat/gpio.h: In function ‘gpio_set_value’:
arch/arm/plat-pxa/include/plat/gpio.h:21:4: error: lvalue required as
left operand of assignment
arch/arm/plat-pxa/include/plat/gpio.h:23:4: error: lvalue required as
left operand of assignment
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | arch/arm/mach-mmp/include/mach/gpio-pxa.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-mmp/include/mach/gpio-pxa.h b/arch/arm/mach-mmp/include/mach/gpio-pxa.h index d14eeaf16322..99b4ce1b6562 100644 --- a/arch/arm/mach-mmp/include/mach/gpio-pxa.h +++ b/arch/arm/mach-mmp/include/mach/gpio-pxa.h @@ -7,7 +7,7 @@ #define GPIO_REGS_VIRT (APB_VIRT_BASE + 0x19000) #define BANK_OFF(n) (((n) < 3) ? (n) << 2 : 0x100 + (((n) - 3) << 2)) -#define GPIO_REG(x) (GPIO_REGS_VIRT + (x)) +#define GPIO_REG(x) (*(volatile u32 *)(GPIO_REGS_VIRT + (x))) #define NR_BUILTIN_GPIO IRQ_GPIO_NUM |