[ARM] 3725/1: sharpsl_pm: warn about wrong temperature
authorPavel Machek <pavel@ucw.cz>
Tue, 11 Jul 2006 21:56:14 +0000 (22:56 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Tue, 11 Jul 2006 21:56:14 +0000 (22:56 +0100)
Patch from Pavel Machek

Also warn users about charging in unsuitable temperature.

Signed-off-by: Pavel Machek <pavel@suse.cz>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/common/sharpsl_pm.c

index 045e37e073305b84f1259109f0170be9304629bd..59b5ddec480f6992db54c2e8d0fdae5c9639b2ac 100644 (file)
@@ -412,8 +412,10 @@ static int sharpsl_check_battery_temp(void)
        val = get_select_val(buff);
 
        dev_dbg(sharpsl_pm.dev, "Temperature: %d\n", val);
-       if (val > sharpsl_pm.machinfo->charge_on_temp)
+       if (val > sharpsl_pm.machinfo->charge_on_temp) {
+               printk(KERN_WARNING "Not charging: temperature out of limits.\n");
                return -1;
+       }
 
        return 0;
 }