]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/macintosh/via-pmu.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[linux-2.6-omap-h63xx.git] / drivers / macintosh / via-pmu.c
index 6eb93e45fcd3f624005714b5c27dc7205e703c12..0b5ff553e39a01046c4afeaf480eceb8020208a3 100644 (file)
@@ -161,7 +161,9 @@ static int drop_interrupts;
 #if defined(CONFIG_PM) && defined(CONFIG_PPC32)
 static int option_lid_wakeup = 1;
 #endif /* CONFIG_PM && CONFIG_PPC32 */
+#if (defined(CONFIG_PM)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT)
 static int sleep_in_progress;
+#endif
 static unsigned long async_req_locks;
 static unsigned int pmu_irq_stats[11];
 
@@ -185,7 +187,7 @@ extern int disable_kernel_backlight;
 
 int __fake_sleep;
 int asleep;
-struct notifier_block *sleep_notifier_list;
+BLOCKING_NOTIFIER_HEAD(sleep_notifier_list);
 
 #ifdef CONFIG_ADB
 static int adb_dev_map = 0;
@@ -825,7 +827,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;
@@ -2201,8 +2203,7 @@ pmac_wakeup_devices(void)
 #define        GRACKLE_NAP     (1<<4)
 #define        GRACKLE_SLEEP   (1<<3)
 
-int
-powerbook_sleep_grackle(void)
+static int powerbook_sleep_grackle(void)
 {
        unsigned long save_l2cr;
        unsigned short pmcr1;