diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2014-05-17 01:25:43 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-05-19 06:01:27 +0400 |
commit | d2aca8f9a64c26dcd9b3eb27db949f830eb80b28 (patch) | |
tree | 947028ac39abd24dbd624dc5108ad35f92a146cd /arch/sparc/kernel/process_32.c | |
parent | 7738925de8500093638dd7fa0e5c1d8128c9fc6a (diff) | |
download | linux-d2aca8f9a64c26dcd9b3eb27db949f830eb80b28.tar.xz |
sparc32: fix sparse warning in auxio_32.c
Fix following warning:
auxio_32.c:133:33: warning: cast removes address space of expression
To fix this auxio_power_register had to be defined as u8 _iomem.
Use proper sbus operations on the pointer.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/process_32.c')
-rw-r--r-- | arch/sparc/kernel/process_32.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c index 61f810b0a9d9..50e7b626afe8 100644 --- a/arch/sparc/kernel/process_32.c +++ b/arch/sparc/kernel/process_32.c @@ -106,8 +106,12 @@ void machine_restart(char * cmd) void machine_power_off(void) { if (auxio_power_register && - (strcmp(of_console_device->type, "serial") || scons_pwroff)) - *auxio_power_register |= AUXIO_POWER_OFF; + (strcmp(of_console_device->type, "serial") || scons_pwroff)) { + u8 power_register = sbus_readb(auxio_power_register); + power_register |= AUXIO_POWER_OFF; + sbus_writeb(power_register, auxio_power_register); + } + machine_halt(); } |