Skip to contentSkip to conversation

sharpsl_pm: warn about wrong temperature

PATCH New Pavel Machek 1 participant 1 message Jul 8, 2006 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sharpsl_pm: warn about wrong temperature

Also warn users about charging in unsuitable temperature.

PATCH FOLLOWS
KernelVersion: 2.6.18-rc1-git

arch/arm/common/sharpsl_pm.c +3 -1
index 045e37e..12beac3 100644
@@ -412,8 +429,10 @@ static int sharpsl_check_battery_temp(vo
 	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;
 }
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html