[PATCH] macintosh: correct AC Power info in /proc/pmu/info
Report AC Power present in /proc/pmu/info if there is no battery. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>, Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
6acaba8e22
commit
63e1fd41c7
1 changed files with 1 additions and 1 deletions
|
@ -825,7 +825,7 @@ proc_get_info(char *page, char **start, off_t off,
|
|||
p += sprintf(p, "PMU driver version : %d\n", PMU_DRIVER_VERSION);
|
||||
p += sprintf(p, "PMU firmware version : %02x\n", pmu_version);
|
||||
p += sprintf(p, "AC Power : %d\n",
|
||||
((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0));
|
||||
((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0) || pmu_battery_count == 0);
|
||||
p += sprintf(p, "Battery count : %d\n", pmu_battery_count);
|
||||
|
||||
return p - page;
|
||||
|
|
Loading…
Reference in a new issue