From: Pavel Machek Date: Tue, 11 Jul 2006 21:56:14 +0000 (+0100) Subject: [ARM] 3725/1: sharpsl_pm: warn about wrong temperature X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=2704f0e69f9e191c6f5873ebfc878e4be1893ef8;p=deliverable%2Flinux.git [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 Acked-by: Richard Purdie Acked-by: Richard Purdie Signed-off-by: Russell King --- diff --git a/arch/arm/common/sharpsl_pm.c b/arch/arm/common/sharpsl_pm.c index 045e37e07330..59b5ddec480f 100644 --- a/arch/arm/common/sharpsl_pm.c +++ b/arch/arm/common/sharpsl_pm.c @@ -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; }