Skip to content

Commit bca73e4

Browse files
jgarzikLinus Torvalds
authored andcommitted
[PATCH] move pm_register/etc. to CONFIG_PM_LEGACY, pm_legacy.h
Since few people need the support anymore, this moves the legacy pm_xxx functions to CONFIG_PM_LEGACY, and include/linux/pm_legacy.h. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 95e861d commit bca73e4

20 files changed

Lines changed: 102 additions & 69 deletions

File tree

‎arch/arm/kernel/apm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include <linux/apm_bios.h>
2121
#include <linux/sched.h>
2222
#include <linux/pm.h>
23+
#include <linux/pm_legacy.h>
2324
#include <linux/device.h>
2425
#include <linux/kernel.h>
2526
#include <linux/list.h>

‎arch/frv/kernel/pm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/config.h>
1515
#include <linux/init.h>
1616
#include <linux/pm.h>
17+
#include <linux/pm_legacy.h>
1718
#include <linux/sched.h>
1819
#include <linux/interrupt.h>
1920
#include <linux/sysctl.h>

‎arch/i386/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ depends on PM && !X86_VISWS
699699

700700
config APM
701701
tristate "APM (Advanced Power Management) BIOS support"
702-
depends on PM
702+
depends on PM && PM_LEGACY
703703
---help---
704704
APM is a BIOS specification for saving power using several different
705705
techniques. This is mostly useful for battery powered laptops with

‎arch/i386/kernel/apm.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,7 @@
218218
#include <linux/time.h>
219219
#include <linux/sched.h>
220220
#include <linux/pm.h>
221+
#include <linux/pm_legacy.h>
221222
#include <linux/device.h>
222223
#include <linux/kernel.h>
223224
#include <linux/smp.h>

‎arch/mips/au1000/common/power.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <linux/config.h>
3333
#include <linux/init.h>
3434
#include <linux/pm.h>
35+
#include <linux/pm_legacy.h>
3536
#include <linux/slab.h>
3637
#include <linux/sysctl.h>
3738
#include <linux/jiffies.h>

‎drivers/acpi/bus.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include <linux/list.h>
2929
#include <linux/sched.h>
3030
#include <linux/pm.h>
31+
#include <linux/pm_legacy.h>
3132
#include <linux/device.h>
3233
#include <linux/proc_fs.h>
3334
#ifdef CONFIG_X86
@@ -754,7 +755,7 @@ static int __init acpi_init(void)
754755
result = acpi_bus_init();
755756

756757
if (!result) {
757-
#ifdef CONFIG_PM
758+
#ifdef CONFIG_PM_LEGACY
758759
if (!PM_IS_ACTIVE())
759760
pm_active = 1;
760761
else {

‎drivers/net/3c509.c‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ static int max_interrupt_work = 10;
8484
#include <linux/netdevice.h>
8585
#include <linux/etherdevice.h>
8686
#include <linux/pm.h>
87+
#include <linux/pm_legacy.h>
8788
#include <linux/skbuff.h>
8889
#include <linux/delay.h> /* for udelay() */
8990
#include <linux/spinlock.h>
@@ -173,7 +174,7 @@ struct el3_private {
173174
/* skb send-queue */
174175
int head, size;
175176
struct sk_buff *queue[SKB_QUEUE_SIZE];
176-
#ifdef CONFIG_PM
177+
#ifdef CONFIG_PM_LEGACY
177178
struct pm_dev *pmdev;
178179
#endif
179180
enum {
@@ -200,7 +201,7 @@ static void el3_tx_timeout (struct net_device *dev);
200201
static void el3_down(struct net_device *dev);
201202
static void el3_up(struct net_device *dev);
202203
static struct ethtool_ops ethtool_ops;
203-
#ifdef CONFIG_PM
204+
#ifdef CONFIG_PM_LEGACY
204205
static int el3_suspend(struct pm_dev *pdev);
205206
static int el3_resume(struct pm_dev *pdev);
206207
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)
361362
struct el3_private *lp = netdev_priv(dev);
362363

363364
(void) lp; /* Keep gcc quiet... */
364-
#ifdef CONFIG_PM
365+
#ifdef CONFIG_PM_LEGACY
365366
if (lp->pmdev)
366367
pm_unregister(lp->pmdev);
367368
#endif
@@ -571,7 +572,7 @@ static int __init el3_probe(int card_idx)
571572
if (err)
572573
goto out1;
573574

574-
#ifdef CONFIG_PM
575+
#ifdef CONFIG_PM_LEGACY
575576
/* register power management */
576577
lp->pmdev = pm_register(PM_ISA_DEV, card_idx, el3_pm_callback);
577578
if (lp->pmdev) {
@@ -1479,7 +1480,7 @@ el3_up(struct net_device *dev)
14791480
}
14801481

14811482
/* Power Management support functions */
1482-
#ifdef CONFIG_PM
1483+
#ifdef CONFIG_PM_LEGACY
14831484

14841485
static int
14851486
el3_suspend(struct pm_dev *pdev)
@@ -1548,7 +1549,7 @@ el3_pm_callback(struct pm_dev *pdev, pm_request_t rqst, void *data)
15481549
return 0;
15491550
}
15501551

1551-
#endif /* CONFIG_PM */
1552+
#endif /* CONFIG_PM_LEGACY */
15521553

15531554
/* Parameters that may be passed into the module. */
15541555
static int debug = -1;

‎drivers/net/irda/ali-ircc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <asm/byteorder.h>
4141

4242
#include <linux/pm.h>
43+
#include <linux/pm_legacy.h>
4344

4445
#include <net/irda/wrapper.h>
4546
#include <net/irda/irda.h>

‎drivers/net/irda/nsc-ircc.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@
5959
#include <asm/byteorder.h>
6060

6161
#include <linux/pm.h>
62+
#include <linux/pm_legacy.h>
6263

6364
#include <net/irda/wrapper.h>
6465
#include <net/irda/irda.h>

‎drivers/serial/68328serial.c‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
#include <linux/keyboard.h>
3535
#include <linux/init.h>
3636
#include <linux/pm.h>
37+
#include <linux/pm_legacy.h>
3738
#include <linux/bitops.h>
3839
#include <linux/delay.h>
3940

@@ -1343,7 +1344,7 @@ static void show_serial_version(void)
13431344
printk("MC68328 serial driver version 1.00\n");
13441345
}
13451346

1346-
#ifdef CONFIG_PM
1347+
#ifdef CONFIG_PM_LEGACY
13471348
/* Serial Power management
13481349
* The console (currently fixed at line 0) is a special case for power
13491350
* management because the kernel is so chatty. The console will be
@@ -1393,7 +1394,7 @@ void startup_console(void)
13931394
struct m68k_serial *info = &m68k_soft[0];
13941395
startup(info);
13951396
}
1396-
#endif
1397+
#endif /* CONFIG_PM_LEGACY */
13971398

13981399

13991400
static struct tty_operations rs_ops = {
@@ -1486,7 +1487,7 @@ rs68328_init(void)
14861487
IRQ_FLG_STD,
14871488
"M68328_UART", NULL))
14881489
panic("Unable to attach 68328 serial interrupt\n");
1489-
#ifdef CONFIG_PM
1490+
#ifdef CONFIG_PM_LEGACY
14901491
serial_pm[i] = pm_register(PM_SYS_DEV, PM_SYS_COM, serial_pm_callback);
14911492
if (serial_pm[i])
14921493
serial_pm[i]->data = info;

0 commit comments

Comments
 (0)