From: Jean Delvare Date: Sat, 10 Dec 2011 21:53:36 +0000 (+0100) Subject: power_supply: Assume mains power by default X-Git-Tag: v3.3-rc1~98^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2530daa187be3adef2d7cb41bd51f1384e478f2b;p=pandora-kernel.git power_supply: Assume mains power by default If no power class device is found in power_supply_is_system_supplied(), the function currently returns 0, which basically means that the system is supposed to be running on battery. In practice, mobile devices tend to always implement at least one power class device and more often two (battery and AC adapter). Systems with no registered power class devices are more likely to be desktop systems, where the system is always powered by mains. So, change the default return value of power_supply_is_system_supplied() from 0 (running on battery) to 1 (running on mains.) Signed-off-by: Jean Delvare Cc: David Woodhouse Cc: Matthew Garrett Cc: Alex Deucher Signed-off-by: Anton Vorontsov --- Reading git-diff-tree failed