Commit 7e7f56f9 authored by Pavel Machek's avatar Pavel Machek Committed by Greg Kroah-Hartman

pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume

commit 99f329a2 upstream.

sharpsl_pm.c code tries to read battery state very early during
resume, but those battery meters are connected on SPI and that's only
resumed way later.

Replace the check with simple checking of battery fatal signal, that
actually works at this stage.
Signed-off-by: default avatarPavel Machek <pavel@ucw.cz>
Tested-by: default avatarStanislav Brabec <utx@penguin.cz>
Signed-off-by: default avatarEric Miao <eric.y.miao@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent be16b784
...@@ -678,8 +678,8 @@ static int corgi_enter_suspend(unsigned long alarm_time, unsigned int alarm_enab ...@@ -678,8 +678,8 @@ static int corgi_enter_suspend(unsigned long alarm_time, unsigned int alarm_enab
dev_dbg(sharpsl_pm.dev, "User triggered wakeup in offline charger.\n"); dev_dbg(sharpsl_pm.dev, "User triggered wakeup in offline charger.\n");
} }
if ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) || (sharpsl_fatal_check() < 0) ) if ((!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_LOCK)) ||
{ (!sharpsl_pm.machinfo->read_devdata(SHARPSL_STATUS_FATAL))) {
dev_err(sharpsl_pm.dev, "Fatal condition. Suspend.\n"); dev_err(sharpsl_pm.dev, "Fatal condition. Suspend.\n");
corgi_goto_sleep(alarm_time, alarm_enable, state); corgi_goto_sleep(alarm_time, alarm_enable, state);
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment