aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/via-pmu.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2006-03-14 00:20:42 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-14 10:57:17 -0500
commit63e1fd41c7127650d355e7db7dd92890edf5523b (patch)
tree7830390fb26a1b2e69b4e98eddc5f73683decd1d /drivers/macintosh/via-pmu.c
parent6acaba8e22bb355409e06d9e7ce4e7bef1bcaa04 (diff)
[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>
Diffstat (limited to 'drivers/macintosh/via-pmu.c')
-rw-r--r--drivers/macintosh/via-pmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index 6eb93e45fcd3..4a478eb0e27d 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -825,7 +825,7 @@ proc_get_info(char *page, char **start, off_t off,
825 p += sprintf(p, "PMU driver version : %d\n", PMU_DRIVER_VERSION); 825 p += sprintf(p, "PMU driver version : %d\n", PMU_DRIVER_VERSION);
826 p += sprintf(p, "PMU firmware version : %02x\n", pmu_version); 826 p += sprintf(p, "PMU firmware version : %02x\n", pmu_version);
827 p += sprintf(p, "AC Power : %d\n", 827 p += sprintf(p, "AC Power : %d\n",
828 ((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0)); 828 ((pmu_power_flags & PMU_PWR_AC_PRESENT) != 0) || pmu_battery_count == 0);
829 p += sprintf(p, "Battery count : %d\n", pmu_battery_count); 829 p += sprintf(p, "Battery count : %d\n", pmu_battery_count);
830 830
831 return p - page; 831 return p - page;