[ARM] 3725/1: sharpsl_pm: warn about wrong temperature

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>
This commit is contained in:
Pavel Machek 2006-07-11 22:56:14 +01:00 committed by Russell King
parent 3821589c3b
commit 2704f0e69f
1 changed files with 3 additions and 1 deletions

View 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;
}