From: Benjamin Herrenschmidt Date: Tue, 14 Mar 2006 05:20:42 +0000 (-0800) Subject: [PATCH] macintosh: correct AC Power info in /proc/pmu/info X-Git-Tag: v2.6.16~44 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=63e1fd41c7127650d355e7db7dd92890edf5523b;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Benjamin Herrenschmidt , Cc: Paul Mackerras Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 6eb93e45fcd..4a478eb0e27 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, 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;