diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/macintosh/adb.c | 4 | ||||
-rw-r--r-- | drivers/macintosh/via-pmu.c | 34 |
2 files changed, 19 insertions, 19 deletions
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c index bc77c5e2ca9f..5c742a526082 100644 --- a/drivers/macintosh/adb.c +++ b/drivers/macintosh/adb.c | |||
@@ -89,7 +89,7 @@ static int sleepy_trackpad; | |||
89 | static int autopoll_devs; | 89 | static int autopoll_devs; |
90 | int __adb_probe_sync; | 90 | int __adb_probe_sync; |
91 | 91 | ||
92 | #ifdef CONFIG_PM | 92 | #ifdef CONFIG_PM_SLEEP |
93 | static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when); | 93 | static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when); |
94 | static struct pmu_sleep_notifier adb_sleep_notifier = { | 94 | static struct pmu_sleep_notifier adb_sleep_notifier = { |
95 | adb_notify_sleep, | 95 | adb_notify_sleep, |
@@ -313,7 +313,7 @@ int __init adb_init(void) | |||
313 | printk(KERN_WARNING "Warning: no ADB interface detected\n"); | 313 | printk(KERN_WARNING "Warning: no ADB interface detected\n"); |
314 | adb_controller = NULL; | 314 | adb_controller = NULL; |
315 | } else { | 315 | } else { |
316 | #ifdef CONFIG_PM | 316 | #ifdef CONFIG_PM_SLEEP |
317 | pmu_register_sleep_notifier(&adb_sleep_notifier); | 317 | pmu_register_sleep_notifier(&adb_sleep_notifier); |
318 | #endif /* CONFIG_PM */ | 318 | #endif /* CONFIG_PM */ |
319 | #ifdef CONFIG_PPC | 319 | #ifdef CONFIG_PPC |
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c index 157080b3b468..04f3973e3874 100644 --- a/drivers/macintosh/via-pmu.c +++ b/drivers/macintosh/via-pmu.c | |||
@@ -152,10 +152,10 @@ static spinlock_t pmu_lock; | |||
152 | static u8 pmu_intr_mask; | 152 | static u8 pmu_intr_mask; |
153 | static int pmu_version; | 153 | static int pmu_version; |
154 | static int drop_interrupts; | 154 | static int drop_interrupts; |
155 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 155 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
156 | static int option_lid_wakeup = 1; | 156 | static int option_lid_wakeup = 1; |
157 | #endif /* CONFIG_PM && CONFIG_PPC32 */ | 157 | #endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ |
158 | #if (defined(CONFIG_PM)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY) | 158 | #if (defined(CONFIG_PM_SLEEP)&&defined(CONFIG_PPC32))||defined(CONFIG_PMAC_BACKLIGHT_LEGACY) |
159 | static int sleep_in_progress; | 159 | static int sleep_in_progress; |
160 | #endif | 160 | #endif |
161 | static unsigned long async_req_locks; | 161 | static unsigned long async_req_locks; |
@@ -875,7 +875,7 @@ proc_read_options(char *page, char **start, off_t off, | |||
875 | { | 875 | { |
876 | char *p = page; | 876 | char *p = page; |
877 | 877 | ||
878 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 878 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
879 | if (pmu_kind == PMU_KEYLARGO_BASED && | 879 | if (pmu_kind == PMU_KEYLARGO_BASED && |
880 | pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) | 880 | pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) |
881 | p += sprintf(p, "lid_wakeup=%d\n", option_lid_wakeup); | 881 | p += sprintf(p, "lid_wakeup=%d\n", option_lid_wakeup); |
@@ -916,7 +916,7 @@ proc_write_options(struct file *file, const char __user *buffer, | |||
916 | *(val++) = 0; | 916 | *(val++) = 0; |
917 | while(*val == ' ') | 917 | while(*val == ' ') |
918 | val++; | 918 | val++; |
919 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 919 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
920 | if (pmu_kind == PMU_KEYLARGO_BASED && | 920 | if (pmu_kind == PMU_KEYLARGO_BASED && |
921 | pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) | 921 | pmac_call_feature(PMAC_FTR_SLEEP_STATE,NULL,0,-1) >= 0) |
922 | if (!strcmp(label, "lid_wakeup")) | 922 | if (!strcmp(label, "lid_wakeup")) |
@@ -1738,7 +1738,7 @@ pmu_present(void) | |||
1738 | return via != 0; | 1738 | return via != 0; |
1739 | } | 1739 | } |
1740 | 1740 | ||
1741 | #ifdef CONFIG_PM | 1741 | #ifdef CONFIG_PM_SLEEP |
1742 | 1742 | ||
1743 | static LIST_HEAD(sleep_notifiers); | 1743 | static LIST_HEAD(sleep_notifiers); |
1744 | 1744 | ||
@@ -1769,9 +1769,9 @@ pmu_unregister_sleep_notifier(struct pmu_sleep_notifier* n) | |||
1769 | return 0; | 1769 | return 0; |
1770 | } | 1770 | } |
1771 | EXPORT_SYMBOL(pmu_unregister_sleep_notifier); | 1771 | EXPORT_SYMBOL(pmu_unregister_sleep_notifier); |
1772 | #endif /* CONFIG_PM */ | 1772 | #endif /* CONFIG_PM_SLEEP */ |
1773 | 1773 | ||
1774 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 1774 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
1775 | 1775 | ||
1776 | /* Sleep is broadcast last-to-first */ | 1776 | /* Sleep is broadcast last-to-first */ |
1777 | static void broadcast_sleep(int when) | 1777 | static void broadcast_sleep(int when) |
@@ -2390,7 +2390,7 @@ powerbook_sleep_3400(void) | |||
2390 | return 0; | 2390 | return 0; |
2391 | } | 2391 | } |
2392 | 2392 | ||
2393 | #endif /* CONFIG_PM && CONFIG_PPC32 */ | 2393 | #endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ |
2394 | 2394 | ||
2395 | /* | 2395 | /* |
2396 | * Support for /dev/pmu device | 2396 | * Support for /dev/pmu device |
@@ -2573,7 +2573,7 @@ pmu_ioctl(struct inode * inode, struct file *filp, | |||
2573 | int error = -EINVAL; | 2573 | int error = -EINVAL; |
2574 | 2574 | ||
2575 | switch (cmd) { | 2575 | switch (cmd) { |
2576 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 2576 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
2577 | case PMU_IOC_SLEEP: | 2577 | case PMU_IOC_SLEEP: |
2578 | if (!capable(CAP_SYS_ADMIN)) | 2578 | if (!capable(CAP_SYS_ADMIN)) |
2579 | return -EACCES; | 2579 | return -EACCES; |
@@ -2601,7 +2601,7 @@ pmu_ioctl(struct inode * inode, struct file *filp, | |||
2601 | return put_user(0, argp); | 2601 | return put_user(0, argp); |
2602 | else | 2602 | else |
2603 | return put_user(1, argp); | 2603 | return put_user(1, argp); |
2604 | #endif /* CONFIG_PM && CONFIG_PPC32 */ | 2604 | #endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ |
2605 | 2605 | ||
2606 | #ifdef CONFIG_PMAC_BACKLIGHT_LEGACY | 2606 | #ifdef CONFIG_PMAC_BACKLIGHT_LEGACY |
2607 | /* Compatibility ioctl's for backlight */ | 2607 | /* Compatibility ioctl's for backlight */ |
@@ -2757,7 +2757,7 @@ pmu_polled_request(struct adb_request *req) | |||
2757 | * to do suspend-to-disk. | 2757 | * to do suspend-to-disk. |
2758 | */ | 2758 | */ |
2759 | 2759 | ||
2760 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 2760 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
2761 | 2761 | ||
2762 | int pmu_sys_suspended; | 2762 | int pmu_sys_suspended; |
2763 | 2763 | ||
@@ -2792,7 +2792,7 @@ static int pmu_sys_resume(struct sys_device *sysdev) | |||
2792 | return 0; | 2792 | return 0; |
2793 | } | 2793 | } |
2794 | 2794 | ||
2795 | #endif /* CONFIG_PM && CONFIG_PPC32 */ | 2795 | #endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ |
2796 | 2796 | ||
2797 | static struct sysdev_class pmu_sysclass = { | 2797 | static struct sysdev_class pmu_sysclass = { |
2798 | set_kset_name("pmu"), | 2798 | set_kset_name("pmu"), |
@@ -2803,10 +2803,10 @@ static struct sys_device device_pmu = { | |||
2803 | }; | 2803 | }; |
2804 | 2804 | ||
2805 | static struct sysdev_driver driver_pmu = { | 2805 | static struct sysdev_driver driver_pmu = { |
2806 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 2806 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
2807 | .suspend = &pmu_sys_suspend, | 2807 | .suspend = &pmu_sys_suspend, |
2808 | .resume = &pmu_sys_resume, | 2808 | .resume = &pmu_sys_resume, |
2809 | #endif /* CONFIG_PM && CONFIG_PPC32 */ | 2809 | #endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ |
2810 | }; | 2810 | }; |
2811 | 2811 | ||
2812 | static int __init init_pmu_sysfs(void) | 2812 | static int __init init_pmu_sysfs(void) |
@@ -2841,10 +2841,10 @@ EXPORT_SYMBOL(pmu_wait_complete); | |||
2841 | EXPORT_SYMBOL(pmu_suspend); | 2841 | EXPORT_SYMBOL(pmu_suspend); |
2842 | EXPORT_SYMBOL(pmu_resume); | 2842 | EXPORT_SYMBOL(pmu_resume); |
2843 | EXPORT_SYMBOL(pmu_unlock); | 2843 | EXPORT_SYMBOL(pmu_unlock); |
2844 | #if defined(CONFIG_PM) && defined(CONFIG_PPC32) | 2844 | #if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32) |
2845 | EXPORT_SYMBOL(pmu_enable_irled); | 2845 | EXPORT_SYMBOL(pmu_enable_irled); |
2846 | EXPORT_SYMBOL(pmu_battery_count); | 2846 | EXPORT_SYMBOL(pmu_battery_count); |
2847 | EXPORT_SYMBOL(pmu_batteries); | 2847 | EXPORT_SYMBOL(pmu_batteries); |
2848 | EXPORT_SYMBOL(pmu_power_flags); | 2848 | EXPORT_SYMBOL(pmu_power_flags); |
2849 | #endif /* CONFIG_PM && CONFIG_PPC32 */ | 2849 | #endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */ |
2850 | 2850 | ||