diff options
| -rw-r--r-- | arch/arm/kernel/apm.c | 1 | ||||
| -rw-r--r-- | arch/frv/kernel/pm.c | 1 | ||||
| -rw-r--r-- | arch/i386/Kconfig | 2 | ||||
| -rw-r--r-- | arch/i386/kernel/apm.c | 1 | ||||
| -rw-r--r-- | arch/mips/au1000/common/power.c | 1 | ||||
| -rw-r--r-- | drivers/acpi/bus.c | 3 | ||||
| -rw-r--r-- | drivers/net/3c509.c | 13 | ||||
| -rw-r--r-- | drivers/net/irda/ali-ircc.c | 1 | ||||
| -rw-r--r-- | drivers/net/irda/nsc-ircc.c | 1 | ||||
| -rw-r--r-- | drivers/serial/68328serial.c | 7 | ||||
| -rw-r--r-- | include/linux/pm.h | 49 | ||||
| -rw-r--r-- | include/linux/pm_legacy.h | 56 | ||||
| -rw-r--r-- | kernel/power/Kconfig | 9 | ||||
| -rw-r--r-- | kernel/power/Makefile | 3 | ||||
| -rw-r--r-- | kernel/power/pm.c | 1 | ||||
| -rw-r--r-- | sound/oss/ad1848.c | 1 | ||||
| -rw-r--r-- | sound/oss/cs4281/cs4281m.c | 1 | ||||
| -rw-r--r-- | sound/oss/maestro.c | 1 | ||||
| -rw-r--r-- | sound/oss/nm256_audio.c | 1 | ||||
| -rw-r--r-- | sound/oss/opl3sa2.c | 18 |
20 files changed, 102 insertions, 69 deletions
diff --git a/arch/arm/kernel/apm.c b/arch/arm/kernel/apm.c index b0bbd1e62e..a2843be055 100644 --- a/arch/arm/kernel/apm.c +++ b/arch/arm/kernel/apm.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/apm_bios.h> | 20 | #include <linux/apm_bios.h> |
| 21 | #include <linux/sched.h> | 21 | #include <linux/sched.h> |
| 22 | #include <linux/pm.h> | 22 | #include <linux/pm.h> |
| 23 | #include <linux/pm_legacy.h> | ||
| 23 | #include <linux/device.h> | 24 | #include <linux/device.h> |
| 24 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
| 25 | #include <linux/list.h> | 26 | #include <linux/list.h> |
diff --git a/arch/frv/kernel/pm.c b/arch/frv/kernel/pm.c index 1a1e8a119c..712c3c24c9 100644 --- a/arch/frv/kernel/pm.c +++ b/arch/frv/kernel/pm.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <linux/config.h> | 14 | #include <linux/config.h> |
| 15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
| 16 | #include <linux/pm.h> | 16 | #include <linux/pm.h> |
| 17 | #include <linux/pm_legacy.h> | ||
| 17 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
| 18 | #include <linux/interrupt.h> | 19 | #include <linux/interrupt.h> |
| 19 | #include <linux/sysctl.h> | 20 | #include <linux/sysctl.h> |
diff --git a/arch/i386/Kconfig b/arch/i386/Kconfig index dbf90ad6ea..6004bb0795 100644 --- a/arch/i386/Kconfig +++ b/arch/i386/Kconfig | |||
| @@ -699,7 +699,7 @@ depends on PM && !X86_VISWS | |||
| 699 | 699 | ||
| 700 | config APM | 700 | config APM |
| 701 | tristate "APM (Advanced Power Management) BIOS support" | 701 | tristate "APM (Advanced Power Management) BIOS support" |
| 702 | depends on PM | 702 | depends on PM && PM_LEGACY |
| 703 | ---help--- | 703 | ---help--- |
| 704 | APM is a BIOS specification for saving power using several different | 704 | APM is a BIOS specification for saving power using several different |
| 705 | techniques. This is mostly useful for battery powered laptops with | 705 | techniques. This is mostly useful for battery powered laptops with |
diff --git a/arch/i386/kernel/apm.c b/arch/i386/kernel/apm.c index 003548b873..1e60acbed3 100644 --- a/arch/i386/kernel/apm.c +++ b/arch/i386/kernel/apm.c | |||
| @@ -218,6 +218,7 @@ | |||
| 218 | #include <linux/time.h> | 218 | #include <linux/time.h> |
| 219 | #include <linux/sched.h> | 219 | #include <linux/sched.h> |
| 220 | #include <linux/pm.h> | 220 | #include <linux/pm.h> |
| 221 | #include <linux/pm_legacy.h> | ||
| 221 | #include <linux/device.h> | 222 | #include <linux/device.h> |
| 222 | #include <linux/kernel.h> | 223 | #include <linux/kernel.h> |
| 223 | #include <linux/smp.h> | 224 | #include <linux/smp.h> |
diff --git a/arch/mips/au1000/common/power.c b/arch/mips/au1000/common/power.c index f85093b8d5..f4926315fb 100644 --- a/arch/mips/au1000/common/power.c +++ b/arch/mips/au1000/common/power.c | |||
| @@ -32,6 +32,7 @@ | |||
| 32 | #include <linux/config.h> | 32 | #include <linux/config.h> |
| 33 | #include <linux/init.h> | 33 | #include <linux/init.h> |
| 34 | #include <linux/pm.h> | 34 | #include <linux/pm.h> |
| 35 | #include <linux/pm_legacy.h> | ||
| 35 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
| 36 | #include <linux/sysctl.h> | 37 | #include <linux/sysctl.h> |
| 37 | #include <linux/jiffies.h> | 38 | #include <linux/jiffies.h> |
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c index 6a4da417c1..606f8733a7 100644 --- a/drivers/acpi/bus.c +++ b/drivers/acpi/bus.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
| 29 | #include <linux/sched.h> | 29 | #include <linux/sched.h> |
| 30 | #include <linux/pm.h> | 30 | #include <linux/pm.h> |
| 31 | #include <linux/pm_legacy.h> | ||
| 31 | #include <linux/device.h> | 32 | #include <linux/device.h> |
| 32 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
| 33 | #ifdef CONFIG_X86 | 34 | #ifdef CONFIG_X86 |
| @@ -754,7 +755,7 @@ static int __init acpi_init(void) | |||
| 754 | result = acpi_bus_init(); | 755 | result = acpi_bus_init(); |
| 755 | 756 | ||
| 756 | if (!result) { | 757 | if (!result) { |
| 757 | #ifdef CONFIG_PM | 758 | #ifdef CONFIG_PM_LEGACY |
| 758 | if (!PM_IS_ACTIVE()) | 759 | if (!PM_IS_ACTIVE()) |
| 759 | pm_active = 1; | 760 | pm_active = 1; |
| 760 | else { | 761 | else { |
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 977935a3d8..824e430486 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
| @@ -84,6 +84,7 @@ static int max_interrupt_work = 10; | |||
| 84 | #include <linux/netdevice.h> | 84 | #include <linux/netdevice.h> |
| 85 | #include <linux/etherdevice.h> | 85 | #include <linux/etherdevice.h> |
| 86 | #include <linux/pm.h> | 86 | #include <linux/pm.h> |
| 87 | #include <linux/pm_legacy.h> | ||
| 87 | #include <linux/skbuff.h> | 88 | #include <linux/skbuff.h> |
| 88 | #include <linux/delay.h> /* for udelay() */ | 89 | #include <linux/delay.h> /* for udelay() */ |
| 89 | #include <linux/spinlock.h> | 90 | #include <linux/spinlock.h> |
| @@ -173,7 +174,7 @@ struct el3_private { | |||
| 173 | /* skb send-queue */ | 174 | /* skb send-queue */ |
| 174 | int head, size; | 175 | int head, size; |
| 175 | struct sk_buff *queue[SKB_QUEUE_SIZE]; | 176 | struct sk_buff *queue[SKB_QUEUE_SIZE]; |
| 176 | #ifdef CONFIG_PM | 177 | #ifdef CONFIG_PM_LEGACY |
| 177 | struct pm_dev *pmdev; | 178 | struct pm_dev *pmdev; |
| 178 | #endif | 179 | #endif |
| 179 | enum { | 180 | enum { |
| @@ -200,7 +201,7 @@ static void el3_tx_timeout (struct net_device *dev); | |||
| 200 | static void el3_down(struct net_device *dev); | 201 | static void el3_down(struct net_device *dev); |
| 201 | static void el3_up(struct net_device *dev); | 202 | static void el3_up(struct net_device *dev); |
| 202 | static struct ethtool_ops ethtool_ops; | 203 | static struct ethtool_ops ethtool_ops; |
| 203 | #ifdef CONFIG_PM | 204 | #ifdef CONFIG_PM_LEGACY |
| 204 | static int el3_suspend(struct pm_dev *pdev); | 205 | static int el3_suspend(struct pm_dev *pdev); |
| 205 | static int el3_resume(struct pm_dev *pdev); | 206 | static int el3_resume(struct pm_dev *pdev); |
| 206 | static int el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data); | 207 | static int el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data); |
| @@ -361,7 +362,7 @@ static void el3_common_remove (struct net_device *dev) | |||
| 361 | struct el3_private *lp = netdev_priv(dev); | 362 | struct el3_private *lp = netdev_priv(dev); |
| 362 | 363 | ||
| 363 | (void) lp; /* Keep gcc quiet... */ | 364 | (void) lp; /* Keep gcc quiet... */ |
| 364 | #ifdef CONFIG_PM | 365 | #ifdef CONFIG_PM_LEGACY |
| 365 | if (lp->pmdev) | 366 | if (lp->pmdev) |
| 366 | pm_unregister(lp->pmdev); | 367 | pm_unregister(lp->pmdev); |
| 367 | #endif | 368 | #endif |
| @@ -571,7 +572,7 @@ no_pnp: | |||
| 571 | if (err) | 572 | if (err) |
| 572 | goto out1; | 573 | goto out1; |
| 573 | 574 | ||
| 574 | #ifdef CONFIG_PM | 575 | #ifdef CONFIG_PM_LEGACY |
| 575 | /* register power management */ | 576 | /* register power management */ |
| 576 | lp->pmdev = pm_register(PM_ISA_DEV, card_idx, el3_pm_callback); | 577 | lp->pmdev = pm_register(PM_ISA_DEV, card_idx, el3_pm_callback); |
| 577 | if (lp->pmdev) { | 578 | if (lp->pmdev) { |
| @@ -1479,7 +1480,7 @@ el3_up(struct net_device *dev) | |||
| 1479 | } | 1480 | } |
| 1480 | 1481 | ||
| 1481 | /* Power Management support functions */ | 1482 | /* Power Management support functions */ |
| 1482 | #ifdef CONFIG_PM | 1483 | #ifdef CONFIG_PM_LEGACY |
| 1483 | 1484 | ||
| 1484 | static int | 1485 | static int |
| 1485 | el3_suspend(struct pm_dev *pdev) | 1486 | el3_suspend(struct pm_dev *pdev) |
| @@ -1548,7 +1549,7 @@ el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data) | |||
| 1548 | return 0; | 1549 | return 0; |
| 1549 | } | 1550 | } |
| 1550 | 1551 | ||
| 1551 | #endif /* CONFIG_PM */ | 1552 | #endif /* CONFIG_PM_LEGACY */ |
| 1552 | 1553 | ||
| 1553 | /* Parameters that may be passed into the module. */ | 1554 | /* Parameters that may be passed into the module. */ |
| 1554 | static int debug = -1; | 1555 | static int debug = -1; |
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index 9bf34681d3..2e7882eb7d 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <asm/byteorder.h> | 40 | #include <asm/byteorder.h> |
| 41 | 41 | ||
| 42 | #include <linux/pm.h> | 42 | #include <linux/pm.h> |
| 43 | #include <linux/pm_legacy.h> | ||
| 43 | 44 | ||
| 44 | #include <net/irda/wrapper.h> | 45 | #include <net/irda/wrapper.h> |
| 45 | #include <net/irda/irda.h> | 46 | #include <net/irda/irda.h> |
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c index 805714ec9a..ee717d0e93 100644 --- a/drivers/net/irda/nsc-ircc.c +++ b/drivers/net/irda/nsc-ircc.c | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | #include <asm/byteorder.h> | 59 | #include <asm/byteorder.h> |
| 60 | 60 | ||
| 61 | #include <linux/pm.h> | 61 | #include <linux/pm.h> |
| 62 | #include <linux/pm_legacy.h> | ||
| 62 | 63 | ||
| 63 | #include <net/irda/wrapper.h> | 64 | #include <net/irda/wrapper.h> |
| 64 | #include <net/irda/irda.h> | 65 | #include <net/irda/irda.h> |
diff --git a/drivers/serial/68328serial.c b/drivers/serial/68328serial.c index 2efb317153..67e9afa000 100644 --- a/drivers/serial/68328serial.c +++ b/drivers/serial/68328serial.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/keyboard.h> | 34 | #include <linux/keyboard.h> |
| 35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
| 36 | #include <linux/pm.h> | 36 | #include <linux/pm.h> |
| 37 | #include <linux/pm_legacy.h> | ||
| 37 | #include <linux/bitops.h> | 38 | #include <linux/bitops.h> |
| 38 | #include <linux/delay.h> | 39 | #include <linux/delay.h> |
| 39 | 40 | ||
| @@ -1343,7 +1344,7 @@ static void show_serial_version(void) | |||
| 1343 | printk("MC68328 serial driver version 1.00\n"); | 1344 | printk("MC68328 serial driver version 1.00\n"); |
| 1344 | } | 1345 | } |
| 1345 | 1346 | ||
| 1346 | #ifdef CONFIG_PM | 1347 | #ifdef CONFIG_PM_LEGACY |
| 1347 | /* Serial Power management | 1348 | /* Serial Power management |
| 1348 | * The console (currently fixed at line 0) is a special case for power | 1349 | * The console (currently fixed at line 0) is a special case for power |
| 1349 | * management because the kernel is so chatty. The console will be | 1350 | * management because the kernel is so chatty. The console will be |
| @@ -1393,7 +1394,7 @@ void startup_console(void) | |||
| 1393 | struct m68k_serial *info = &m68k_soft[0]; | 1394 | struct m68k_serial *info = &m68k_soft[0]; |
| 1394 | startup(info); | 1395 | startup(info); |
| 1395 | } | 1396 | } |
| 1396 | #endif | 1397 | #endif /* CONFIG_PM_LEGACY */ |
| 1397 | 1398 | ||
| 1398 | 1399 | ||
| 1399 | static struct tty_operations rs_ops = { | 1400 | static struct tty_operations rs_ops = { |
| @@ -1486,7 +1487,7 @@ rs68328_init(void) | |||
| 1486 | IRQ_FLG_STD, | 1487 | IRQ_FLG_STD, |
| 1487 | "M68328_UART", NULL)) | 1488 | "M68328_UART", NULL)) |
| 1488 | panic("Unable to attach 68328 serial interrupt\n"); | 1489 | panic("Unable to attach 68328 serial interrupt\n"); |
| 1489 | #ifdef CONFIG_PM | 1490 | #ifdef CONFIG_PM_LEGACY |
| 1490 | serial_pm[i] = pm_register(PM_SYS_DEV, PM_SYS_COM, serial_pm_callback); | 1491 | serial_pm[i] = pm_register(PM_SYS_DEV, PM_SYS_COM, serial_pm_callback); |
| 1491 | if (serial_pm[i]) | 1492 | if (serial_pm[i]) |
| 1492 | serial_pm[i]->data = info; | 1493 | serial_pm[i]->data = info; |
diff --git a/include/linux/pm.h b/include/linux/pm.h index 1514098d15..5be87ba3b7 100644 --- a/include/linux/pm.h +++ b/include/linux/pm.h | |||
| @@ -94,55 +94,6 @@ struct pm_dev | |||
| 94 | struct list_head entry; | 94 | struct list_head entry; |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | #ifdef CONFIG_PM | ||
| 98 | |||
| 99 | extern int pm_active; | ||
| 100 | |||
| 101 | #define PM_IS_ACTIVE() (pm_active != 0) | ||
| 102 | |||
| 103 | /* | ||
| 104 | * Register a device with power management | ||
| 105 | */ | ||
| 106 | struct pm_dev __deprecated * | ||
| 107 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); | ||
| 108 | |||
| 109 | /* | ||
| 110 | * Unregister a device with power management | ||
| 111 | */ | ||
| 112 | void __deprecated pm_unregister(struct pm_dev *dev); | ||
| 113 | |||
| 114 | /* | ||
| 115 | * Unregister all devices with matching callback | ||
| 116 | */ | ||
| 117 | void __deprecated pm_unregister_all(pm_callback callback); | ||
| 118 | |||
| 119 | /* | ||
| 120 | * Send a request to all devices | ||
| 121 | */ | ||
| 122 | int __deprecated pm_send_all(pm_request_t rqst, void *data); | ||
| 123 | |||
| 124 | #else /* CONFIG_PM */ | ||
| 125 | |||
| 126 | #define PM_IS_ACTIVE() 0 | ||
| 127 | |||
| 128 | static inline struct pm_dev *pm_register(pm_dev_t type, | ||
| 129 | unsigned long id, | ||
| 130 | pm_callback callback) | ||
| 131 | { | ||
| 132 | return NULL; | ||
| 133 | } | ||
| 134 | |||
| 135 | static inline void pm_unregister(struct pm_dev *dev) {} | ||
| 136 | |||
| 137 | static inline void pm_unregister_all(pm_callback callback) {} | ||
| 138 | |||
| 139 | static inline int pm_send_all(pm_request_t rqst, void *data) | ||
| 140 | { | ||
| 141 | return 0; | ||
| 142 | } | ||
| 143 | |||
| 144 | #endif /* CONFIG_PM */ | ||
| 145 | |||
| 146 | /* Functions above this comment are list-based old-style power | 97 | /* Functions above this comment are list-based old-style power |
| 147 | * managment. Please avoid using them. */ | 98 | * managment. Please avoid using them. */ |
| 148 | 99 | ||
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h new file mode 100644 index 0000000000..1252b45fac --- /dev/null +++ b/include/linux/pm_legacy.h | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | #ifndef __LINUX_PM_LEGACY_H__ | ||
| 2 | #define __LINUX_PM_LEGACY_H__ | ||
| 3 | |||
| 4 | #include <linux/config.h> | ||
| 5 | |||
| 6 | #ifdef CONFIG_PM_LEGACY | ||
| 7 | |||
| 8 | extern int pm_active; | ||
| 9 | |||
| 10 | #define PM_IS_ACTIVE() (pm_active != 0) | ||
| 11 | |||
| 12 | /* | ||
| 13 | * Register a device with power management | ||
| 14 | */ | ||
| 15 | struct pm_dev __deprecated * | ||
| 16 | pm_register(pm_dev_t type, unsigned long id, pm_callback callback); | ||
| 17 | |||
| 18 | /* | ||
| 19 | * Unregister a device with power management | ||
| 20 | */ | ||
| 21 | void __deprecated pm_unregister(struct pm_dev *dev); | ||
| 22 | |||
| 23 | /* | ||
| 24 | * Unregister all devices with matching callback | ||
| 25 | */ | ||
| 26 | void __deprecated pm_unregister_all(pm_callback callback); | ||
| 27 | |||
| 28 | /* | ||
| 29 | * Send a request to all devices | ||
| 30 | */ | ||
| 31 | int __deprecated pm_send_all(pm_request_t rqst, void *data); | ||
| 32 | |||
| 33 | #else /* CONFIG_PM_LEGACY */ | ||
| 34 | |||
| 35 | #define PM_IS_ACTIVE() 0 | ||
| 36 | |||
| 37 | static inline struct pm_dev *pm_register(pm_dev_t type, | ||
| 38 | unsigned long id, | ||
| 39 | pm_callback callback) | ||
| 40 | { | ||
| 41 | return NULL; | ||
| 42 | } | ||
| 43 | |||
| 44 | static inline void pm_unregister(struct pm_dev *dev) {} | ||
| 45 | |||
| 46 | static inline void pm_unregister_all(pm_callback callback) {} | ||
| 47 | |||
| 48 | static inline int pm_send_all(pm_request_t rqst, void *data) | ||
| 49 | { | ||
| 50 | return 0; | ||
| 51 | } | ||
| 52 | |||
| 53 | #endif /* CONFIG_PM_LEGACY */ | ||
| 54 | |||
| 55 | #endif /* __LINUX_PM_LEGACY_H__ */ | ||
| 56 | |||
diff --git a/kernel/power/Kconfig b/kernel/power/Kconfig index 46a5e5acff..5ec248cb7f 100644 --- a/kernel/power/Kconfig +++ b/kernel/power/Kconfig | |||
| @@ -19,6 +19,15 @@ config PM | |||
| 19 | will issue the hlt instruction if nothing is to be done, thereby | 19 | will issue the hlt instruction if nothing is to be done, thereby |
| 20 | sending the processor to sleep and saving power. | 20 | sending the processor to sleep and saving power. |
| 21 | 21 | ||
| 22 | config PM_LEGACY | ||
| 23 | bool "Legacy Power Management API" | ||
| 24 | depends on PM | ||
| 25 | default y | ||
| 26 | ---help--- | ||
| 27 | Support for pm_register() and friends. | ||
| 28 | |||
| 29 | If unsure, say Y. | ||
| 30 | |||
| 22 | config PM_DEBUG | 31 | config PM_DEBUG |
| 23 | bool "Power Management Debug Support" | 32 | bool "Power Management Debug Support" |
| 24 | depends on PM | 33 | depends on PM |
diff --git a/kernel/power/Makefile b/kernel/power/Makefile index c71eb4579c..04be7d0d96 100644 --- a/kernel/power/Makefile +++ b/kernel/power/Makefile | |||
| @@ -3,7 +3,8 @@ ifeq ($(CONFIG_PM_DEBUG),y) | |||
| 3 | EXTRA_CFLAGS += -DDEBUG | 3 | EXTRA_CFLAGS += -DDEBUG |
| 4 | endif | 4 | endif |
| 5 | 5 | ||
| 6 | obj-y := main.o process.o console.o pm.o | 6 | obj-y := main.o process.o console.o |
| 7 | obj-$(CONFIG_PM_LEGACY) += pm.o | ||
| 7 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o disk.o snapshot.o | 8 | obj-$(CONFIG_SOFTWARE_SUSPEND) += swsusp.o disk.o snapshot.o |
| 8 | 9 | ||
| 9 | obj-$(CONFIG_SUSPEND_SMP) += smp.o | 10 | obj-$(CONFIG_SUSPEND_SMP) += smp.o |
diff --git a/kernel/power/pm.c b/kernel/power/pm.c index 159149321b..33c508e857 100644 --- a/kernel/power/pm.c +++ b/kernel/power/pm.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | #include <linux/mm.h> | 23 | #include <linux/mm.h> |
| 24 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
| 25 | #include <linux/pm.h> | 25 | #include <linux/pm.h> |
| 26 | #include <linux/pm_legacy.h> | ||
| 26 | #include <linux/interrupt.h> | 27 | #include <linux/interrupt.h> |
| 27 | 28 | ||
| 28 | int pm_active; | 29 | int pm_active; |
diff --git a/sound/oss/ad1848.c b/sound/oss/ad1848.c index 7c835abd99..3f30c57676 100644 --- a/sound/oss/ad1848.c +++ b/sound/oss/ad1848.c | |||
| @@ -47,6 +47,7 @@ | |||
| 47 | #include <linux/module.h> | 47 | #include <linux/module.h> |
| 48 | #include <linux/stddef.h> | 48 | #include <linux/stddef.h> |
| 49 | #include <linux/pm.h> | 49 | #include <linux/pm.h> |
| 50 | #include <linux/pm_legacy.h> | ||
| 50 | #include <linux/isapnp.h> | 51 | #include <linux/isapnp.h> |
| 51 | #include <linux/pnp.h> | 52 | #include <linux/pnp.h> |
| 52 | #include <linux/spinlock.h> | 53 | #include <linux/spinlock.h> |
diff --git a/sound/oss/cs4281/cs4281m.c b/sound/oss/cs4281/cs4281m.c index d0d3963e1b..adc689649f 100644 --- a/sound/oss/cs4281/cs4281m.c +++ b/sound/oss/cs4281/cs4281m.c | |||
| @@ -298,6 +298,7 @@ struct cs4281_state { | |||
| 298 | struct cs4281_pipeline pl[CS4281_NUMBER_OF_PIPELINES]; | 298 | struct cs4281_pipeline pl[CS4281_NUMBER_OF_PIPELINES]; |
| 299 | }; | 299 | }; |
| 300 | 300 | ||
| 301 | #include <linux/pm_legacy.h> | ||
| 301 | #include "cs4281pm-24.c" | 302 | #include "cs4281pm-24.c" |
| 302 | 303 | ||
| 303 | #if CSDEBUG | 304 | #if CSDEBUG |
diff --git a/sound/oss/maestro.c b/sound/oss/maestro.c index 3dce504e6d..3abd3541cb 100644 --- a/sound/oss/maestro.c +++ b/sound/oss/maestro.c | |||
| @@ -231,6 +231,7 @@ | |||
| 231 | #include <asm/uaccess.h> | 231 | #include <asm/uaccess.h> |
| 232 | 232 | ||
| 233 | #include <linux/pm.h> | 233 | #include <linux/pm.h> |
| 234 | #include <linux/pm_legacy.h> | ||
| 234 | static int maestro_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *d); | 235 | static int maestro_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *d); |
| 235 | 236 | ||
| 236 | #include "maestro.h" | 237 | #include "maestro.h" |
diff --git a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c index 66970062eb..0ce2c404a7 100644 --- a/sound/oss/nm256_audio.c +++ b/sound/oss/nm256_audio.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
| 26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
| 27 | #include <linux/pm.h> | 27 | #include <linux/pm.h> |
| 28 | #include <linux/pm_legacy.h> | ||
| 28 | #include <linux/delay.h> | 29 | #include <linux/delay.h> |
| 29 | #include <linux/spinlock.h> | 30 | #include <linux/spinlock.h> |
| 30 | #include "sound_config.h" | 31 | #include "sound_config.h" |
diff --git a/sound/oss/opl3sa2.c b/sound/oss/opl3sa2.c index 2efbd86510..cd41d0e470 100644 --- a/sound/oss/opl3sa2.c +++ b/sound/oss/opl3sa2.c | |||
| @@ -70,6 +70,7 @@ | |||
| 70 | #include <linux/module.h> | 70 | #include <linux/module.h> |
| 71 | #include <linux/delay.h> | 71 | #include <linux/delay.h> |
| 72 | #include <linux/pm.h> | 72 | #include <linux/pm.h> |
| 73 | #include <linux/pm_legacy.h> | ||
| 73 | #include "sound_config.h" | 74 | #include "sound_config.h" |
| 74 | 75 | ||
| 75 | #include "ad1848.h" | 76 | #include "ad1848.h" |
| @@ -138,7 +139,7 @@ typedef struct { | |||
| 138 | struct pnp_dev* pdev; | 139 | struct pnp_dev* pdev; |
| 139 | int activated; /* Whether said devices have been activated */ | 140 | int activated; /* Whether said devices have been activated */ |
| 140 | #endif | 141 | #endif |
| 141 | #ifdef CONFIG_PM | 142 | #ifdef CONFIG_PM_LEGACY |
| 142 | unsigned int in_suspend; | 143 | unsigned int in_suspend; |
| 143 | struct pm_dev *pmdev; | 144 | struct pm_dev *pmdev; |
| 144 | #endif | 145 | #endif |
| @@ -341,7 +342,7 @@ static void opl3sa2_mixer_reset(opl3sa2_state_t* devc) | |||
| 341 | } | 342 | } |
| 342 | 343 | ||
| 343 | /* Currently only used for power management */ | 344 | /* Currently only used for power management */ |
| 344 | #ifdef CONFIG_PM | 345 | #ifdef CONFIG_PM_LEGACY |
| 345 | static void opl3sa2_mixer_restore(opl3sa2_state_t* devc) | 346 | static void opl3sa2_mixer_restore(opl3sa2_state_t* devc) |
| 346 | { | 347 | { |
| 347 | if (devc) { | 348 | if (devc) { |
| @@ -354,7 +355,7 @@ static void opl3sa2_mixer_restore(opl3sa2_state_t* devc) | |||
| 354 | } | 355 | } |
| 355 | } | 356 | } |
| 356 | } | 357 | } |
| 357 | #endif | 358 | #endif /* CONFIG_PM_LEGACY */ |
| 358 | 359 | ||
| 359 | static inline void arg_to_vol_mono(unsigned int vol, int* value) | 360 | static inline void arg_to_vol_mono(unsigned int vol, int* value) |
| 360 | { | 361 | { |
| @@ -831,7 +832,8 @@ static struct pnp_driver opl3sa2_driver = { | |||
| 831 | 832 | ||
| 832 | /* End of component functions */ | 833 | /* End of component functions */ |
| 833 | 834 | ||
| 834 | #ifdef CONFIG_PM | 835 | #ifdef CONFIG_PM_LEGACY |
| 836 | |||
| 835 | static DEFINE_SPINLOCK(opl3sa2_lock); | 837 | static DEFINE_SPINLOCK(opl3sa2_lock); |
| 836 | 838 | ||
| 837 | /* Power Management support functions */ | 839 | /* Power Management support functions */ |
| @@ -906,7 +908,7 @@ static int opl3sa2_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *dat | |||
| 906 | } | 908 | } |
| 907 | return 0; | 909 | return 0; |
| 908 | } | 910 | } |
| 909 | #endif /* CONFIG_PM */ | 911 | #endif /* CONFIG_PM_LEGACY */ |
| 910 | 912 | ||
| 911 | /* | 913 | /* |
| 912 | * Install OPL3-SA2 based card(s). | 914 | * Install OPL3-SA2 based card(s). |
| @@ -1019,12 +1021,12 @@ static int __init init_opl3sa2(void) | |||
| 1019 | 1021 | ||
| 1020 | /* ewww =) */ | 1022 | /* ewww =) */ |
| 1021 | opl3sa2_state[card].card = card; | 1023 | opl3sa2_state[card].card = card; |
| 1022 | #ifdef CONFIG_PM | 1024 | #ifdef CONFIG_PM_LEGACY |
| 1023 | /* register our power management capabilities */ | 1025 | /* register our power management capabilities */ |
| 1024 | opl3sa2_state[card].pmdev = pm_register(PM_ISA_DEV, card, opl3sa2_pm_callback); | 1026 | opl3sa2_state[card].pmdev = pm_register(PM_ISA_DEV, card, opl3sa2_pm_callback); |
| 1025 | if (opl3sa2_state[card].pmdev) | 1027 | if (opl3sa2_state[card].pmdev) |
| 1026 | opl3sa2_state[card].pmdev->data = &opl3sa2_state[card]; | 1028 | opl3sa2_state[card].pmdev->data = &opl3sa2_state[card]; |
| 1027 | #endif /* CONFIG_PM */ | 1029 | #endif /* CONFIG_PM_LEGACY */ |
| 1028 | 1030 | ||
| 1029 | /* | 1031 | /* |
| 1030 | * Set the Yamaha 3D enhancement mode (aka Ymersion) if asked to and | 1032 | * Set the Yamaha 3D enhancement mode (aka Ymersion) if asked to and |
| @@ -1081,7 +1083,7 @@ static void __exit cleanup_opl3sa2(void) | |||
| 1081 | int card; | 1083 | int card; |
| 1082 | 1084 | ||
| 1083 | for(card = 0; card < opl3sa2_cards_num; card++) { | 1085 | for(card = 0; card < opl3sa2_cards_num; card++) { |
| 1084 | #ifdef CONFIG_PM | 1086 | #ifdef CONFIG_PM_LEGACY |
| 1085 | if (opl3sa2_state[card].pmdev) | 1087 | if (opl3sa2_state[card].pmdev) |
| 1086 | pm_unregister(opl3sa2_state[card].pmdev); | 1088 | pm_unregister(opl3sa2_state[card].pmdev); |
| 1087 | #endif | 1089 | #endif |
