aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorOlaf Hering <olaf@aepfle.de>2007-08-24 15:42:01 -0400
committerPaul Mackerras <paulus@samba.org>2007-08-25 02:58:27 -0400
commite120e8d03a263cf75f2abc0f8b3a03a65cfd3b88 (patch)
treef40073074e3ce5c19864387a44f6d6faf17bc21f /drivers
parentb22ddc703c5daa603d8d53881b530da3cab94cd4 (diff)
[POWERPC] Fix undefined reference to device_power_up/resume
Current Linus tree fails to link on pmac32: drivers/built-in.o: In function `pmac_wakeup_devices': via-pmu.c:(.text+0x5bab4): undefined reference to `device_power_up' via-pmu.c:(.text+0x5bb08): undefined reference to `device_resume' drivers/built-in.o: In function `pmac_suspend_devices': via-pmu.c:(.text+0x5c260): undefined reference to `device_power_down' via-pmu.c:(.text+0x5c27c): undefined reference to `device_resume' make[1]: *** [.tmp_vmlinux1] Error 1 changing CONFIG_PM > CONFIG_PM_SLEEP leads to: drivers/built-in.o: In function `pmu_led_set': via-pmu-led.c:(.text+0x5cdca): undefined reference to `pmu_sys_suspended' via-pmu-led.c:(.text+0x5cdce): undefined reference to `pmu_sys_suspended' drivers/built-in.o: In function `pmu_req_done': via-pmu-led.c:(.text+0x5ce3e): undefined reference to `pmu_sys_suspended' via-pmu-led.c:(.text+0x5ce42): undefined reference to `pmu_sys_suspended' drivers/built-in.o: In function `adb_init': (.init.text+0x4c5c): undefined reference to `pmu_register_sleep_notifier' make[1]: *** [.tmp_vmlinux1] Error 1 So change even more places from PM to PM_SLEEP to allow linking. Signed-off-by: Olaf Hering <olaf@aepfle.de> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/macintosh/adb.c4
-rw-r--r--drivers/macintosh/via-pmu.c34
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;
89static int autopoll_devs; 89static int autopoll_devs;
90int __adb_probe_sync; 90int __adb_probe_sync;
91 91
92#ifdef CONFIG_PM 92#ifdef CONFIG_PM_SLEEP
93static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when); 93static void adb_notify_sleep(struct pmu_sleep_notifier *self, int when);
94static struct pmu_sleep_notifier adb_sleep_notifier = { 94static 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;
152static u8 pmu_intr_mask; 152static u8 pmu_intr_mask;
153static int pmu_version; 153static int pmu_version;
154static int drop_interrupts; 154static int drop_interrupts;
155#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 155#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
156static int option_lid_wakeup = 1; 156static 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)
159static int sleep_in_progress; 159static int sleep_in_progress;
160#endif 160#endif
161static unsigned long async_req_locks; 161static 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
1743static LIST_HEAD(sleep_notifiers); 1743static 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}
1771EXPORT_SYMBOL(pmu_unregister_sleep_notifier); 1771EXPORT_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 */
1777static void broadcast_sleep(int when) 1777static 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
2762int pmu_sys_suspended; 2762int 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
2797static struct sysdev_class pmu_sysclass = { 2797static 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
2805static struct sysdev_driver driver_pmu = { 2805static 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
2812static int __init init_pmu_sysfs(void) 2812static int __init init_pmu_sysfs(void)
@@ -2841,10 +2841,10 @@ EXPORT_SYMBOL(pmu_wait_complete);
2841EXPORT_SYMBOL(pmu_suspend); 2841EXPORT_SYMBOL(pmu_suspend);
2842EXPORT_SYMBOL(pmu_resume); 2842EXPORT_SYMBOL(pmu_resume);
2843EXPORT_SYMBOL(pmu_unlock); 2843EXPORT_SYMBOL(pmu_unlock);
2844#if defined(CONFIG_PM) && defined(CONFIG_PPC32) 2844#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_PPC32)
2845EXPORT_SYMBOL(pmu_enable_irled); 2845EXPORT_SYMBOL(pmu_enable_irled);
2846EXPORT_SYMBOL(pmu_battery_count); 2846EXPORT_SYMBOL(pmu_battery_count);
2847EXPORT_SYMBOL(pmu_batteries); 2847EXPORT_SYMBOL(pmu_batteries);
2848EXPORT_SYMBOL(pmu_power_flags); 2848EXPORT_SYMBOL(pmu_power_flags);
2849#endif /* CONFIG_PM && CONFIG_PPC32 */ 2849#endif /* CONFIG_PM_SLEEP && CONFIG_PPC32 */
2850 2850