summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/sharpsl_pm.c
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2009-09-06 07:28:40 +0200
committerEric Miao <eric.y.miao@gmail.com>2009-09-07 17:14:59 +0200
commit99f329a2ba3c2d07cc90ca9309babf27ddf98bff (patch)
treeb19a138d39652f61a283defe0b3fe82763e87773 /arch/arm/mach-pxa/sharpsl_pm.c
parentLinux 2.6.31-rc7 (diff)
downloadlinux-99f329a2ba3c2d07cc90ca9309babf27ddf98bff.tar.xz
linux-99f329a2ba3c2d07cc90ca9309babf27ddf98bff.zip
[ARM] pxa/sharpsl_pm: zaurus c3000 aka spitz: fix resume
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: Pavel Machek <pavel@ucw.cz> Tested-by: Stanislav Brabec <utx@penguin.cz> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/sharpsl_pm.c')
-rw-r--r--arch/arm/mach-pxa/sharpsl_pm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-pxa/sharpsl_pm.c b/arch/arm/mach-pxa/sharpsl_pm.c
index 2546c066cd6e..629e05d1196e 100644
--- a/arch/arm/mach-pxa/sharpsl_pm.c
+++ b/arch/arm/mach-pxa/sharpsl_pm.c
@@ -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");
}
- 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");
corgi_goto_sleep(alarm_time, alarm_enable, state);
return 1;