File tree Expand file tree Collapse file tree 5 files changed +7
-48
lines changed Expand file tree Collapse file tree 5 files changed +7
-48
lines changed Original file line number Diff line number Diff line change 227
227
#include <linux/suspend.h>
228
228
#include <linux/kthread.h>
229
229
#include <linux/jiffies.h>
230
+ #include <linux/acpi.h>
230
231
231
232
#include <asm/system.h>
232
233
#include <asm/uaccess.h>
@@ -2331,12 +2332,11 @@ static int __init apm_init(void)
2331
2332
apm_info .disabled = 1 ;
2332
2333
return - ENODEV ;
2333
2334
}
2334
- if (pm_flags & PM_ACPI ) {
2335
+ if (! acpi_disabled ) {
2335
2336
printk (KERN_NOTICE "apm: overridden by ACPI.\n" );
2336
2337
apm_info .disabled = 1 ;
2337
2338
return - ENODEV ;
2338
2339
}
2339
- pm_flags |= PM_APM ;
2340
2340
2341
2341
/*
2342
2342
* Set up the long jump entry point to the APM BIOS, which is called
@@ -2428,7 +2428,6 @@ static void __exit apm_exit(void)
2428
2428
kthread_stop (kapmd_task );
2429
2429
kapmd_task = NULL ;
2430
2430
}
2431
- pm_flags &= ~PM_APM ;
2432
2431
}
2433
2432
2434
2433
module_init (apm_init );
Original file line number Diff line number Diff line change @@ -1007,8 +1007,7 @@ struct kobject *acpi_kobj;
1007
1007
1008
1008
static int __init acpi_init (void )
1009
1009
{
1010
- int result = 0 ;
1011
-
1010
+ int result ;
1012
1011
1013
1012
if (acpi_disabled ) {
1014
1013
printk (KERN_INFO PREFIX "Interpreter disabled.\n" );
@@ -1023,29 +1022,18 @@ static int __init acpi_init(void)
1023
1022
1024
1023
init_acpi_device_notify ();
1025
1024
result = acpi_bus_init ();
1026
-
1027
- if (!result ) {
1028
- pci_mmcfg_late_init ();
1029
- if (pm_apm_enabled ()) {
1030
- printk (KERN_INFO PREFIX
1031
- "APM is already active, exiting\n" );
1032
- disable_acpi ();
1033
- result = - ENODEV ;
1034
- } else {
1035
- pm_set_acpi_flag ();
1036
- }
1037
- } else
1025
+ if (result ) {
1038
1026
disable_acpi ();
1039
-
1040
- if (acpi_disabled )
1041
1027
return result ;
1028
+ }
1042
1029
1030
+ pci_mmcfg_late_init ();
1043
1031
acpi_scan_init ();
1044
1032
acpi_ec_init ();
1045
1033
acpi_debugfs_init ();
1046
1034
acpi_sleep_proc_init ();
1047
1035
acpi_wakeup_device_init ();
1048
- return result ;
1036
+ return 0 ;
1049
1037
}
1050
1038
1051
1039
subsys_initcall (acpi_init );
Original file line number Diff line number Diff line change @@ -565,15 +565,6 @@ enum dpm_order {
565
565
DPM_ORDER_DEV_LAST ,
566
566
};
567
567
568
- /*
569
- * Global Power Management flags
570
- * Used to keep APM and ACPI from both being active
571
- */
572
- extern unsigned int pm_flags ;
573
-
574
- #define PM_APM 1
575
- #define PM_ACPI 2
576
-
577
568
extern int pm_generic_suspend (struct device * dev );
578
569
extern int pm_generic_resume (struct device * dev );
579
570
extern int pm_generic_freeze (struct device * dev );
Original file line number Diff line number Diff line change @@ -272,9 +272,6 @@ extern int unregister_pm_notifier(struct notifier_block *nb);
272
272
register_pm_notifier(&fn##_nb); \
273
273
}
274
274
275
- extern bool pm_apm_enabled (void );
276
- extern void pm_set_acpi_flag (void );
277
-
278
275
/* drivers/base/power/wakeup.c */
279
276
extern bool events_check_enabled ;
280
277
@@ -295,9 +292,6 @@ static inline int unregister_pm_notifier(struct notifier_block *nb)
295
292
296
293
#define pm_notifier (fn , pri ) do { (void)(fn); } while (0)
297
294
298
- static inline bool pm_apm_enabled (void ) { return false; }
299
- static inline void pm_set_acpi_flag (void ) {}
300
-
301
295
static inline bool pm_wakeup_pending (void ) { return false; }
302
296
#endif /* !CONFIG_PM_SLEEP */
303
297
Original file line number Diff line number Diff line change @@ -19,19 +19,6 @@ DEFINE_MUTEX(pm_mutex);
19
19
20
20
#ifdef CONFIG_PM_SLEEP
21
21
22
- unsigned int pm_flags ;
23
- EXPORT_SYMBOL (pm_flags );
24
-
25
- bool pm_apm_enabled (void )
26
- {
27
- return !!(pm_flags & PM_APM );
28
- }
29
-
30
- void pm_set_acpi_flag (void )
31
- {
32
- pm_flags |= PM_ACPI ;
33
- }
34
-
35
22
/* Routines for PM-transition notifications */
36
23
37
24
static BLOCKING_NOTIFIER_HEAD (pm_chain_head );
You can’t perform that action at this time.
0 commit comments