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>
This commit is contained in:

committed by
David S. Miller

parent
7738925de8
commit
d2aca8f9a6
@@ -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();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user