aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/apm_32.c10
-rw-r--r--drivers/acpi/Kconfig9
-rw-r--r--drivers/acpi/ac.c16
-rw-r--r--drivers/acpi/battery.c31
-rw-r--r--drivers/acpi/bus.c7
-rw-r--r--drivers/acpi/ec.c14
-rw-r--r--drivers/acpi/events/evregion.c8
-rw-r--r--drivers/acpi/pci_irq.c9
-rw-r--r--drivers/acpi/processor_idle.c4
-rw-r--r--drivers/acpi/sbs.c23
-rw-r--r--drivers/acpi/scan.c6
-rw-r--r--drivers/pci/quirks.c6
-rw-r--r--drivers/pnp/pnpacpi/rsparser.c14
-rw-r--r--include/linux/pci_ids.h2
-rw-r--r--include/linux/pm.h9
-rw-r--r--include/linux/pm_legacy.h6
-rw-r--r--include/linux/pnp.h2
-rw-r--r--kernel/power/main.c3
-rw-r--r--kernel/power/pm.c4
19 files changed, 139 insertions, 44 deletions
diff --git a/arch/x86/kernel/apm_32.c b/arch/x86/kernel/apm_32.c
index 17089a041028..af045ca0f653 100644
--- a/arch/x86/kernel/apm_32.c
+++ b/arch/x86/kernel/apm_32.c
@@ -2256,14 +2256,12 @@ static int __init apm_init(void)
2256 apm_info.disabled = 1; 2256 apm_info.disabled = 1;
2257 return -ENODEV; 2257 return -ENODEV;
2258 } 2258 }
2259 if (PM_IS_ACTIVE()) { 2259 if (pm_flags & PM_ACPI) {
2260 printk(KERN_NOTICE "apm: overridden by ACPI.\n"); 2260 printk(KERN_NOTICE "apm: overridden by ACPI.\n");
2261 apm_info.disabled = 1; 2261 apm_info.disabled = 1;
2262 return -ENODEV; 2262 return -ENODEV;
2263 } 2263 }
2264#ifdef CONFIG_PM_LEGACY 2264 pm_flags |= PM_APM;
2265 pm_active = 1;
2266#endif
2267 2265
2268 /* 2266 /*
2269 * Set up a segment that references the real mode segment 0x40 2267 * Set up a segment that references the real mode segment 0x40
@@ -2366,9 +2364,7 @@ static void __exit apm_exit(void)
2366 kthread_stop(kapmd_task); 2364 kthread_stop(kapmd_task);
2367 kapmd_task = NULL; 2365 kapmd_task = NULL;
2368 } 2366 }
2369#ifdef CONFIG_PM_LEGACY 2367 pm_flags &= ~PM_APM;
2370 pm_active = 0;
2371#endif
2372} 2368}
2373 2369
2374module_init(apm_init); 2370module_init(apm_init);
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index b9f923ef173d..ccf6ea95f68c 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -82,6 +82,12 @@ config ACPI_PROCFS_POWER
82 and functions, which do not yet exist in /sys 82 and functions, which do not yet exist in /sys
83 83
84 Say N to delete power /proc/acpi/ folders that have moved to /sys/ 84 Say N to delete power /proc/acpi/ folders that have moved to /sys/
85config ACPI_SYSFS_POWER
86 bool "Future power /sys interface"
87 select POWER_SUPPLY
88 default y
89 ---help---
90 Say N to disable power /sys interface
85config ACPI_PROC_EVENT 91config ACPI_PROC_EVENT
86 bool "Deprecated /proc/acpi/event support" 92 bool "Deprecated /proc/acpi/event support"
87 depends on PROC_FS 93 depends on PROC_FS
@@ -103,7 +109,6 @@ config ACPI_PROC_EVENT
103config ACPI_AC 109config ACPI_AC
104 tristate "AC Adapter" 110 tristate "AC Adapter"
105 depends on X86 111 depends on X86
106 select POWER_SUPPLY
107 default y 112 default y
108 help 113 help
109 This driver adds support for the AC Adapter object, which indicates 114 This driver adds support for the AC Adapter object, which indicates
@@ -113,7 +118,6 @@ config ACPI_AC
113config ACPI_BATTERY 118config ACPI_BATTERY
114 tristate "Battery" 119 tristate "Battery"
115 depends on X86 120 depends on X86
116 select POWER_SUPPLY
117 default y 121 default y
118 help 122 help
119 This driver adds support for battery information through 123 This driver adds support for battery information through
@@ -368,7 +372,6 @@ config ACPI_HOTPLUG_MEMORY
368config ACPI_SBS 372config ACPI_SBS
369 tristate "Smart Battery System" 373 tristate "Smart Battery System"
370 depends on X86 374 depends on X86
371 select POWER_SUPPLY
372 help 375 help
373 This driver adds support for the Smart Battery System, another 376 This driver adds support for the Smart Battery System, another
374 type of access to battery information, found on some laptops. 377 type of access to battery information, found on some laptops.
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index 76ed4f52bebd..76b9bea98b6d 100644
--- a/drivers/acpi/ac.c
+++ b/drivers/acpi/ac.c
@@ -31,7 +31,9 @@
31#include <linux/proc_fs.h> 31#include <linux/proc_fs.h>
32#include <linux/seq_file.h> 32#include <linux/seq_file.h>
33#endif 33#endif
34#ifdef CONFIG_ACPI_SYSFS_POWER
34#include <linux/power_supply.h> 35#include <linux/power_supply.h>
36#endif
35#include <acpi/acpi_bus.h> 37#include <acpi/acpi_bus.h>
36#include <acpi/acpi_drivers.h> 38#include <acpi/acpi_drivers.h>
37 39
@@ -79,7 +81,9 @@ static struct acpi_driver acpi_ac_driver = {
79}; 81};
80 82
81struct acpi_ac { 83struct acpi_ac {
84#ifdef CONFIG_ACPI_SYSFS_POWER
82 struct power_supply charger; 85 struct power_supply charger;
86#endif
83 struct acpi_device * device; 87 struct acpi_device * device;
84 unsigned long state; 88 unsigned long state;
85}; 89};
@@ -94,7 +98,7 @@ static const struct file_operations acpi_ac_fops = {
94 .release = single_release, 98 .release = single_release,
95}; 99};
96#endif 100#endif
97 101#ifdef CONFIG_ACPI_SYSFS_POWER
98static int get_ac_property(struct power_supply *psy, 102static int get_ac_property(struct power_supply *psy,
99 enum power_supply_property psp, 103 enum power_supply_property psp,
100 union power_supply_propval *val) 104 union power_supply_propval *val)
@@ -113,7 +117,7 @@ static int get_ac_property(struct power_supply *psy,
113static enum power_supply_property ac_props[] = { 117static enum power_supply_property ac_props[] = {
114 POWER_SUPPLY_PROP_ONLINE, 118 POWER_SUPPLY_PROP_ONLINE,
115}; 119};
116 120#endif
117/* -------------------------------------------------------------------------- 121/* --------------------------------------------------------------------------
118 AC Adapter Management 122 AC Adapter Management
119 -------------------------------------------------------------------------- */ 123 -------------------------------------------------------------------------- */
@@ -241,7 +245,9 @@ static void acpi_ac_notify(acpi_handle handle, u32 event, void *data)
241 acpi_bus_generate_netlink_event(device->pnp.device_class, 245 acpi_bus_generate_netlink_event(device->pnp.device_class,
242 device->dev.bus_id, event, 246 device->dev.bus_id, event,
243 (u32) ac->state); 247 (u32) ac->state);
248#ifdef CONFIG_ACPI_SYSFS_POWER
244 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); 249 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
250#endif
245 break; 251 break;
246 default: 252 default:
247 ACPI_DEBUG_PRINT((ACPI_DB_INFO, 253 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
@@ -280,12 +286,14 @@ static int acpi_ac_add(struct acpi_device *device)
280#endif 286#endif
281 if (result) 287 if (result)
282 goto end; 288 goto end;
289#ifdef CONFIG_ACPI_SYSFS_POWER
283 ac->charger.name = acpi_device_bid(device); 290 ac->charger.name = acpi_device_bid(device);
284 ac->charger.type = POWER_SUPPLY_TYPE_MAINS; 291 ac->charger.type = POWER_SUPPLY_TYPE_MAINS;
285 ac->charger.properties = ac_props; 292 ac->charger.properties = ac_props;
286 ac->charger.num_properties = ARRAY_SIZE(ac_props); 293 ac->charger.num_properties = ARRAY_SIZE(ac_props);
287 ac->charger.get_property = get_ac_property; 294 ac->charger.get_property = get_ac_property;
288 power_supply_register(&ac->device->dev, &ac->charger); 295 power_supply_register(&ac->device->dev, &ac->charger);
296#endif
289 status = acpi_install_notify_handler(device->handle, 297 status = acpi_install_notify_handler(device->handle,
290 ACPI_ALL_NOTIFY, acpi_ac_notify, 298 ACPI_ALL_NOTIFY, acpi_ac_notify,
291 ac); 299 ac);
@@ -319,8 +327,10 @@ static int acpi_ac_resume(struct acpi_device *device)
319 old_state = ac->state; 327 old_state = ac->state;
320 if (acpi_ac_get_state(ac)) 328 if (acpi_ac_get_state(ac))
321 return 0; 329 return 0;
330#ifdef CONFIG_ACPI_SYSFS_POWER
322 if (old_state != ac->state) 331 if (old_state != ac->state)
323 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); 332 kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE);
333#endif
324 return 0; 334 return 0;
325} 335}
326 336
@@ -337,8 +347,10 @@ static int acpi_ac_remove(struct acpi_device *device, int type)
337 347
338 status = acpi_remove_notify_handler(device->handle, 348 status = acpi_remove_notify_handler(device->handle,
339 ACPI_ALL_NOTIFY, acpi_ac_notify); 349 ACPI_ALL_NOTIFY, acpi_ac_notify);
350#ifdef CONFIG_ACPI_SYSFS_POWER
340 if (ac->charger.dev) 351 if (ac->charger.dev)
341 power_supply_unregister(&ac->charger); 352 power_supply_unregister(&ac->charger);
353#endif
342#ifdef CONFIG_ACPI_PROCFS_POWER 354#ifdef CONFIG_ACPI_PROCFS_POWER
343 acpi_ac_remove_fs(device); 355 acpi_ac_remove_fs(device);
344#endif 356#endif
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c
index 8f7505d304b5..c4a769d1ba85 100644
--- a/drivers/acpi/battery.c
+++ b/drivers/acpi/battery.c
@@ -40,7 +40,9 @@
40#include <acpi/acpi_bus.h> 40#include <acpi/acpi_bus.h>
41#include <acpi/acpi_drivers.h> 41#include <acpi/acpi_drivers.h>
42 42
43#ifdef CONFIG_ACPI_SYSFS_POWER
43#include <linux/power_supply.h> 44#include <linux/power_supply.h>
45#endif
44 46
45#define ACPI_BATTERY_VALUE_UNKNOWN 0xFFFFFFFF 47#define ACPI_BATTERY_VALUE_UNKNOWN 0xFFFFFFFF
46 48
@@ -86,7 +88,9 @@ MODULE_DEVICE_TABLE(acpi, battery_device_ids);
86 88
87struct acpi_battery { 89struct acpi_battery {
88 struct mutex lock; 90 struct mutex lock;
91#ifdef CONFIG_ACPI_SYSFS_POWER
89 struct power_supply bat; 92 struct power_supply bat;
93#endif
90 struct acpi_device *device; 94 struct acpi_device *device;
91 unsigned long update_time; 95 unsigned long update_time;
92 int current_now; 96 int current_now;
@@ -117,6 +121,7 @@ inline int acpi_battery_present(struct acpi_battery *battery)
117 return battery->device->status.battery_present; 121 return battery->device->status.battery_present;
118} 122}
119 123
124#ifdef CONFIG_ACPI_SYSFS_POWER
120static int acpi_battery_technology(struct acpi_battery *battery) 125static int acpi_battery_technology(struct acpi_battery *battery)
121{ 126{
122 if (!strcasecmp("NiCd", battery->type)) 127 if (!strcasecmp("NiCd", battery->type))
@@ -222,6 +227,7 @@ static enum power_supply_property energy_battery_props[] = {
222 POWER_SUPPLY_PROP_MODEL_NAME, 227 POWER_SUPPLY_PROP_MODEL_NAME,
223 POWER_SUPPLY_PROP_MANUFACTURER, 228 POWER_SUPPLY_PROP_MANUFACTURER,
224}; 229};
230#endif
225 231
226#ifdef CONFIG_ACPI_PROCFS_POWER 232#ifdef CONFIG_ACPI_PROCFS_POWER
227inline char *acpi_battery_units(struct acpi_battery *battery) 233inline char *acpi_battery_units(struct acpi_battery *battery)
@@ -398,6 +404,7 @@ static int acpi_battery_init_alarm(struct acpi_battery *battery)
398 return acpi_battery_set_alarm(battery); 404 return acpi_battery_set_alarm(battery);
399} 405}
400 406
407#ifdef CONFIG_ACPI_SYSFS_POWER
401static ssize_t acpi_battery_alarm_show(struct device *dev, 408static ssize_t acpi_battery_alarm_show(struct device *dev,
402 struct device_attribute *attr, 409 struct device_attribute *attr,
403 char *buf) 410 char *buf)
@@ -429,11 +436,6 @@ static int sysfs_add_battery(struct acpi_battery *battery)
429{ 436{
430 int result; 437 int result;
431 438
432 battery->update_time = 0;
433 result = acpi_battery_get_info(battery);
434 acpi_battery_init_alarm(battery);
435 if (result)
436 return result;
437 if (battery->power_unit) { 439 if (battery->power_unit) {
438 battery->bat.properties = charge_battery_props; 440 battery->bat.properties = charge_battery_props;
439 battery->bat.num_properties = 441 battery->bat.num_properties =
@@ -462,18 +464,31 @@ static void sysfs_remove_battery(struct acpi_battery *battery)
462 power_supply_unregister(&battery->bat); 464 power_supply_unregister(&battery->bat);
463 battery->bat.dev = NULL; 465 battery->bat.dev = NULL;
464} 466}
467#endif
465 468
466static int acpi_battery_update(struct acpi_battery *battery) 469static int acpi_battery_update(struct acpi_battery *battery)
467{ 470{
468 int result = acpi_battery_get_status(battery); 471 int result;
472 result = acpi_battery_get_status(battery);
469 if (result) 473 if (result)
470 return result; 474 return result;
475#ifdef CONFIG_ACPI_SYSFS_POWER
471 if (!acpi_battery_present(battery)) { 476 if (!acpi_battery_present(battery)) {
472 sysfs_remove_battery(battery); 477 sysfs_remove_battery(battery);
478 battery->update_time = 0;
473 return 0; 479 return 0;
474 } 480 }
481#endif
482 if (!battery->update_time) {
483 result = acpi_battery_get_info(battery);
484 if (result)
485 return result;
486 acpi_battery_init_alarm(battery);
487 }
488#ifdef CONFIG_ACPI_SYSFS_POWER
475 if (!battery->bat.dev) 489 if (!battery->bat.dev)
476 sysfs_add_battery(battery); 490 sysfs_add_battery(battery);
491#endif
477 return acpi_battery_get_state(battery); 492 return acpi_battery_get_state(battery);
478} 493}
479 494
@@ -767,9 +782,11 @@ static void acpi_battery_notify(acpi_handle handle, u32 event, void *data)
767 acpi_bus_generate_netlink_event(device->pnp.device_class, 782 acpi_bus_generate_netlink_event(device->pnp.device_class,
768 device->dev.bus_id, event, 783 device->dev.bus_id, event,
769 acpi_battery_present(battery)); 784 acpi_battery_present(battery));
785#ifdef CONFIG_ACPI_SYSFS_POWER
770 /* acpi_batter_update could remove power_supply object */ 786 /* acpi_batter_update could remove power_supply object */
771 if (battery->bat.dev) 787 if (battery->bat.dev)
772 kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE); 788 kobject_uevent(&battery->bat.dev->kobj, KOBJ_CHANGE);
789#endif
773} 790}
774 791
775static int acpi_battery_add(struct acpi_device *device) 792static int acpi_battery_add(struct acpi_device *device)
@@ -828,7 +845,9 @@ static int acpi_battery_remove(struct acpi_device *device, int type)
828#ifdef CONFIG_ACPI_PROCFS_POWER 845#ifdef CONFIG_ACPI_PROCFS_POWER
829 acpi_battery_remove_fs(device); 846 acpi_battery_remove_fs(device);
830#endif 847#endif
848#ifdef CONFIG_ACPI_SYSFS_POWER
831 sysfs_remove_battery(battery); 849 sysfs_remove_battery(battery);
850#endif
832 mutex_destroy(&battery->lock); 851 mutex_destroy(&battery->lock);
833 kfree(battery); 852 kfree(battery);
834 return 0; 853 return 0;
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 49d432d0a12c..d7a115c362d1 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -29,7 +29,6 @@
29#include <linux/list.h> 29#include <linux/list.h>
30#include <linux/sched.h> 30#include <linux/sched.h>
31#include <linux/pm.h> 31#include <linux/pm.h>
32#include <linux/pm_legacy.h>
33#include <linux/device.h> 32#include <linux/device.h>
34#include <linux/proc_fs.h> 33#include <linux/proc_fs.h>
35#ifdef CONFIG_X86 34#ifdef CONFIG_X86
@@ -764,16 +763,14 @@ static int __init acpi_init(void)
764 result = acpi_bus_init(); 763 result = acpi_bus_init();
765 764
766 if (!result) { 765 if (!result) {
767#ifdef CONFIG_PM_LEGACY 766 if (!(pm_flags & PM_APM))
768 if (!PM_IS_ACTIVE()) 767 pm_flags |= PM_ACPI;
769 pm_active = 1;
770 else { 768 else {
771 printk(KERN_INFO PREFIX 769 printk(KERN_INFO PREFIX
772 "APM is already active, exiting\n"); 770 "APM is already active, exiting\n");
773 disable_acpi(); 771 disable_acpi();
774 result = -ENODEV; 772 result = -ENODEV;
775 } 773 }
776#endif
777 } else 774 } else
778 disable_acpi(); 775 disable_acpi();
779 776
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index d411017f8c06..97dc16155a55 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -892,6 +892,17 @@ static int acpi_ec_stop(struct acpi_device *device, int type)
892 return 0; 892 return 0;
893} 893}
894 894
895int __init acpi_boot_ec_enable(void)
896{
897 if (!boot_ec || boot_ec->handlers_installed)
898 return 0;
899 if (!ec_install_handlers(boot_ec)) {
900 first_ec = boot_ec;
901 return 0;
902 }
903 return -EFAULT;
904}
905
895int __init acpi_ec_ecdt_probe(void) 906int __init acpi_ec_ecdt_probe(void)
896{ 907{
897 int ret; 908 int ret;
@@ -924,9 +935,10 @@ int __init acpi_ec_ecdt_probe(void)
924 goto error; 935 goto error;
925 /* We really need to limit this workaround, the only ASUS, 936 /* We really need to limit this workaround, the only ASUS,
926 * which needs it, has fake EC._INI method, so use it as flag. 937 * which needs it, has fake EC._INI method, so use it as flag.
938 * Keep boot_ec struct as it will be needed soon.
927 */ 939 */
928 if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x))) 940 if (ACPI_FAILURE(acpi_get_handle(boot_ec->handle, "_INI", &x)))
929 goto error; 941 return -ENODEV;
930 } 942 }
931 943
932 ret = ec_install_handlers(boot_ec); 944 ret = ec_install_handlers(boot_ec);
diff --git a/drivers/acpi/events/evregion.c b/drivers/acpi/events/evregion.c
index e99f0c435a47..58ad09725dd2 100644
--- a/drivers/acpi/events/evregion.c
+++ b/drivers/acpi/events/evregion.c
@@ -344,7 +344,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
344 * setup will potentially execute control methods 344 * setup will potentially execute control methods
345 * (e.g., _REG method for this region) 345 * (e.g., _REG method for this region)
346 */ 346 */
347 acpi_ex_relinquish_interpreter(); 347 acpi_ex_exit_interpreter();
348 348
349 status = region_setup(region_obj, ACPI_REGION_ACTIVATE, 349 status = region_setup(region_obj, ACPI_REGION_ACTIVATE,
350 handler_desc->address_space.context, 350 handler_desc->address_space.context,
@@ -352,7 +352,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
352 352
353 /* Re-enter the interpreter */ 353 /* Re-enter the interpreter */
354 354
355 acpi_ex_reacquire_interpreter(); 355 acpi_ex_enter_interpreter();
356 356
357 /* Check for failure of the Region Setup */ 357 /* Check for failure of the Region Setup */
358 358
@@ -405,7 +405,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
405 * exit the interpreter because the handler *might* block -- we don't 405 * exit the interpreter because the handler *might* block -- we don't
406 * know what it will do, so we can't hold the lock on the intepreter. 406 * know what it will do, so we can't hold the lock on the intepreter.
407 */ 407 */
408 acpi_ex_relinquish_interpreter(); 408 acpi_ex_exit_interpreter();
409 } 409 }
410 410
411 /* Call the handler */ 411 /* Call the handler */
@@ -426,7 +426,7 @@ acpi_ev_address_space_dispatch(union acpi_operand_object *region_obj,
426 * We just returned from a non-default handler, we must re-enter the 426 * We just returned from a non-default handler, we must re-enter the
427 * interpreter 427 * interpreter
428 */ 428 */
429 acpi_ex_reacquire_interpreter(); 429 acpi_ex_enter_interpreter();
430 } 430 }
431 431
432 return_ACPI_STATUS(status); 432 return_ACPI_STATUS(status);
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index dd3186abe07a..62010c2481b3 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -429,6 +429,15 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
429 &polarity, &link, 429 &polarity, &link,
430 acpi_pci_allocate_irq); 430 acpi_pci_allocate_irq);
431 431
432 if (irq < 0) {
433 /*
434 * IDE legacy mode controller IRQs are magic. Why do compat
435 * extensions always make such a nasty mess.
436 */
437 if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE &&
438 (dev->class & 0x05) == 0)
439 return 0;
440 }
432 /* 441 /*
433 * No IRQ known to the ACPI subsystem - maybe the BIOS / 442 * No IRQ known to the ACPI subsystem - maybe the BIOS /
434 * driver reported one, then use it. Exit in any case. 443 * driver reported one, then use it. Exit in any case.
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 2fe34cc73c13..2235f4e02d26 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -76,7 +76,11 @@ static void (*pm_idle_save) (void) __read_mostly;
76#define PM_TIMER_TICKS_TO_US(p) (((p) * 1000)/(PM_TIMER_FREQUENCY/1000)) 76#define PM_TIMER_TICKS_TO_US(p) (((p) * 1000)/(PM_TIMER_FREQUENCY/1000))
77 77
78static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER; 78static unsigned int max_cstate __read_mostly = ACPI_PROCESSOR_MAX_POWER;
79#ifdef CONFIG_CPU_IDLE
79module_param(max_cstate, uint, 0000); 80module_param(max_cstate, uint, 0000);
81#else
82module_param(max_cstate, uint, 0644);
83#endif
80static unsigned int nocst __read_mostly; 84static unsigned int nocst __read_mostly;
81module_param(nocst, uint, 0000); 85module_param(nocst, uint, 0000);
82 86
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index 22cb95b349e4..f136c7d3b3c2 100644
--- a/drivers/acpi/sbs.c
+++ b/drivers/acpi/sbs.c
@@ -40,7 +40,9 @@
40#include <linux/jiffies.h> 40#include <linux/jiffies.h>
41#include <linux/delay.h> 41#include <linux/delay.h>
42 42
43#ifdef CONFIG_ACPI_SYSFS_POWER
43#include <linux/power_supply.h> 44#include <linux/power_supply.h>
45#endif
44 46
45#include "sbshc.h" 47#include "sbshc.h"
46 48
@@ -80,7 +82,9 @@ static const struct acpi_device_id sbs_device_ids[] = {
80MODULE_DEVICE_TABLE(acpi, sbs_device_ids); 82MODULE_DEVICE_TABLE(acpi, sbs_device_ids);
81 83
82struct acpi_battery { 84struct acpi_battery {
85#ifdef CONFIG_ACPI_SYSFS_POWER
83 struct power_supply bat; 86 struct power_supply bat;
87#endif
84 struct acpi_sbs *sbs; 88 struct acpi_sbs *sbs;
85#ifdef CONFIG_ACPI_PROCFS_POWER 89#ifdef CONFIG_ACPI_PROCFS_POWER
86 struct proc_dir_entry *proc_entry; 90 struct proc_dir_entry *proc_entry;
@@ -113,7 +117,9 @@ struct acpi_battery {
113#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat); 117#define to_acpi_battery(x) container_of(x, struct acpi_battery, bat);
114 118
115struct acpi_sbs { 119struct acpi_sbs {
120#ifdef CONFIG_ACPI_SYSFS_POWER
116 struct power_supply charger; 121 struct power_supply charger;
122#endif
117 struct acpi_device *device; 123 struct acpi_device *device;
118 struct acpi_smb_hc *hc; 124 struct acpi_smb_hc *hc;
119 struct mutex lock; 125 struct mutex lock;
@@ -157,6 +163,7 @@ static inline int acpi_battery_scale(struct acpi_battery *battery)
157 acpi_battery_ipscale(battery); 163 acpi_battery_ipscale(battery);
158} 164}
159 165
166#ifdef CONFIG_ACPI_SYSFS_POWER
160static int sbs_get_ac_property(struct power_supply *psy, 167static int sbs_get_ac_property(struct power_supply *psy,
161 enum power_supply_property psp, 168 enum power_supply_property psp,
162 union power_supply_propval *val) 169 union power_supply_propval *val)
@@ -294,6 +301,7 @@ static enum power_supply_property sbs_energy_battery_props[] = {
294 POWER_SUPPLY_PROP_MODEL_NAME, 301 POWER_SUPPLY_PROP_MODEL_NAME,
295 POWER_SUPPLY_PROP_MANUFACTURER, 302 POWER_SUPPLY_PROP_MANUFACTURER,
296}; 303};
304#endif
297 305
298/* -------------------------------------------------------------------------- 306/* --------------------------------------------------------------------------
299 Smart Battery System Management 307 Smart Battery System Management
@@ -429,6 +437,7 @@ static int acpi_ac_get_present(struct acpi_sbs *sbs)
429 return result; 437 return result;
430} 438}
431 439
440#ifdef CONFIG_ACPI_SYSFS_POWER
432static ssize_t acpi_battery_alarm_show(struct device *dev, 441static ssize_t acpi_battery_alarm_show(struct device *dev,
433 struct device_attribute *attr, 442 struct device_attribute *attr,
434 char *buf) 443 char *buf)
@@ -458,6 +467,7 @@ static struct device_attribute alarm_attr = {
458 .show = acpi_battery_alarm_show, 467 .show = acpi_battery_alarm_show,
459 .store = acpi_battery_alarm_store, 468 .store = acpi_battery_alarm_store,
460}; 469};
470#endif
461 471
462/* -------------------------------------------------------------------------- 472/* --------------------------------------------------------------------------
463 FS Interface (/proc/acpi) 473 FS Interface (/proc/acpi)
@@ -793,6 +803,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
793 &acpi_battery_state_fops, &acpi_battery_alarm_fops, 803 &acpi_battery_state_fops, &acpi_battery_alarm_fops,
794 battery); 804 battery);
795#endif 805#endif
806#ifdef CONFIG_ACPI_SYSFS_POWER
796 battery->bat.name = battery->name; 807 battery->bat.name = battery->name;
797 battery->bat.type = POWER_SUPPLY_TYPE_BATTERY; 808 battery->bat.type = POWER_SUPPLY_TYPE_BATTERY;
798 if (!acpi_battery_mode(battery)) { 809 if (!acpi_battery_mode(battery)) {
@@ -813,6 +824,7 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
813 goto end; 824 goto end;
814 battery->have_sysfs_alarm = 1; 825 battery->have_sysfs_alarm = 1;
815 end: 826 end:
827#endif
816 printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n", 828 printk(KERN_INFO PREFIX "%s [%s]: Battery Slot [%s] (battery %s)\n",
817 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device), 829 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
818 battery->name, sbs->battery->present ? "present" : "absent"); 830 battery->name, sbs->battery->present ? "present" : "absent");
@@ -822,12 +834,13 @@ static int acpi_battery_add(struct acpi_sbs *sbs, int id)
822static void acpi_battery_remove(struct acpi_sbs *sbs, int id) 834static void acpi_battery_remove(struct acpi_sbs *sbs, int id)
823{ 835{
824 struct acpi_battery *battery = &sbs->battery[id]; 836 struct acpi_battery *battery = &sbs->battery[id];
825 837#ifdef CONFIG_ACPI_SYSFS_POWER
826 if (battery->bat.dev) { 838 if (battery->bat.dev) {
827 if (battery->have_sysfs_alarm) 839 if (battery->have_sysfs_alarm)
828 device_remove_file(battery->bat.dev, &alarm_attr); 840 device_remove_file(battery->bat.dev, &alarm_attr);
829 power_supply_unregister(&battery->bat); 841 power_supply_unregister(&battery->bat);
830 } 842 }
843#endif
831#ifdef CONFIG_ACPI_PROCFS_POWER 844#ifdef CONFIG_ACPI_PROCFS_POWER
832 if (battery->proc_entry) 845 if (battery->proc_entry)
833 acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir); 846 acpi_sbs_remove_fs(&battery->proc_entry, acpi_battery_dir);
@@ -848,12 +861,14 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
848 if (result) 861 if (result)
849 goto end; 862 goto end;
850#endif 863#endif
864#ifdef CONFIG_ACPI_SYSFS_POWER
851 sbs->charger.name = "sbs-charger"; 865 sbs->charger.name = "sbs-charger";
852 sbs->charger.type = POWER_SUPPLY_TYPE_MAINS; 866 sbs->charger.type = POWER_SUPPLY_TYPE_MAINS;
853 sbs->charger.properties = sbs_ac_props; 867 sbs->charger.properties = sbs_ac_props;
854 sbs->charger.num_properties = ARRAY_SIZE(sbs_ac_props); 868 sbs->charger.num_properties = ARRAY_SIZE(sbs_ac_props);
855 sbs->charger.get_property = sbs_get_ac_property; 869 sbs->charger.get_property = sbs_get_ac_property;
856 power_supply_register(&sbs->device->dev, &sbs->charger); 870 power_supply_register(&sbs->device->dev, &sbs->charger);
871#endif
857 printk(KERN_INFO PREFIX "%s [%s]: AC Adapter [%s] (%s)\n", 872 printk(KERN_INFO PREFIX "%s [%s]: AC Adapter [%s] (%s)\n",
858 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device), 873 ACPI_SBS_DEVICE_NAME, acpi_device_bid(sbs->device),
859 ACPI_AC_DIR_NAME, sbs->charger_present ? "on-line" : "off-line"); 874 ACPI_AC_DIR_NAME, sbs->charger_present ? "on-line" : "off-line");
@@ -863,8 +878,10 @@ static int acpi_charger_add(struct acpi_sbs *sbs)
863 878
864static void acpi_charger_remove(struct acpi_sbs *sbs) 879static void acpi_charger_remove(struct acpi_sbs *sbs)
865{ 880{
881#ifdef CONFIG_ACPI_SYSFS_POWER
866 if (sbs->charger.dev) 882 if (sbs->charger.dev)
867 power_supply_unregister(&sbs->charger); 883 power_supply_unregister(&sbs->charger);
884#endif
868#ifdef CONFIG_ACPI_PROCFS_POWER 885#ifdef CONFIG_ACPI_PROCFS_POWER
869 if (sbs->charger_entry) 886 if (sbs->charger_entry)
870 acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir); 887 acpi_sbs_remove_fs(&sbs->charger_entry, acpi_ac_dir);
@@ -885,7 +902,9 @@ void acpi_sbs_callback(void *context)
885 ACPI_SBS_NOTIFY_STATUS, 902 ACPI_SBS_NOTIFY_STATUS,
886 sbs->charger_present); 903 sbs->charger_present);
887#endif 904#endif
905#ifdef CONFIG_ACPI_SYSFS_POWER
888 kobject_uevent(&sbs->charger.dev->kobj, KOBJ_CHANGE); 906 kobject_uevent(&sbs->charger.dev->kobj, KOBJ_CHANGE);
907#endif
889 } 908 }
890 if (sbs->manager_present) { 909 if (sbs->manager_present) {
891 for (id = 0; id < MAX_SBS_BAT; ++id) { 910 for (id = 0; id < MAX_SBS_BAT; ++id) {
@@ -902,7 +921,9 @@ void acpi_sbs_callback(void *context)
902 ACPI_SBS_NOTIFY_STATUS, 921 ACPI_SBS_NOTIFY_STATUS,
903 bat->present); 922 bat->present);
904#endif 923#endif
924#ifdef CONFIG_ACPI_SYSFS_POWER
905 kobject_uevent(&bat->bat.dev->kobj, KOBJ_CHANGE); 925 kobject_uevent(&bat->bat.dev->kobj, KOBJ_CHANGE);
926#endif
906 } 927 }
907 } 928 }
908} 929}
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 5b4d462117cf..cbfe9ae7a9e5 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -1449,6 +1449,8 @@ static int acpi_bus_scan_fixed(struct acpi_device *root)
1449 return result; 1449 return result;
1450} 1450}
1451 1451
1452int __init acpi_boot_ec_enable(void);
1453
1452static int __init acpi_scan_init(void) 1454static int __init acpi_scan_init(void)
1453{ 1455{
1454 int result; 1456 int result;
@@ -1480,6 +1482,10 @@ static int __init acpi_scan_init(void)
1480 * Enumerate devices in the ACPI namespace. 1482 * Enumerate devices in the ACPI namespace.
1481 */ 1483 */
1482 result = acpi_bus_scan_fixed(acpi_root); 1484 result = acpi_bus_scan_fixed(acpi_root);
1485
1486 /* EC region might be needed at bus_scan, so enable it now */
1487 acpi_boot_ec_enable();
1488
1483 if (!result) 1489 if (!result)
1484 result = acpi_bus_scan(acpi_root, &ops); 1490 result = acpi_bus_scan(acpi_root, &ops);
1485 1491
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 26cc4dcf4f0e..72e0bd5d80ac 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -465,6 +465,12 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31, quirk
465DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_0, quirk_ich6_lpc_acpi ); 465DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_0, quirk_ich6_lpc_acpi );
466DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_2, quirk_ich6_lpc_acpi ); 466DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_2, quirk_ich6_lpc_acpi );
467DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_3, quirk_ich6_lpc_acpi ); 467DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_3, quirk_ich6_lpc_acpi );
468DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_1, quirk_ich6_lpc_acpi );
469DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH8_4, quirk_ich6_lpc_acpi );
470DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_2, quirk_ich6_lpc_acpi );
471DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_4, quirk_ich6_lpc_acpi );
472DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_7, quirk_ich6_lpc_acpi );
473DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH9_8, quirk_ich6_lpc_acpi );
468 474
469/* 475/*
470 * VIA ACPI: One IO region pointed to by longword at 476 * VIA ACPI: One IO region pointed to by longword at
diff --git a/drivers/pnp/pnpacpi/rsparser.c b/drivers/pnp/pnpacpi/rsparser.c
index 3c5eb374adf8..f7b8648acbfa 100644
--- a/drivers/pnp/pnpacpi/rsparser.c
+++ b/drivers/pnp/pnpacpi/rsparser.c
@@ -76,6 +76,7 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res,
76 int i = 0; 76 int i = 0;
77 int irq; 77 int irq;
78 int p, t; 78 int p, t;
79 static unsigned char warned;
79 80
80 if (!valid_IRQ(gsi)) 81 if (!valid_IRQ(gsi))
81 return; 82 return;
@@ -83,9 +84,10 @@ static void pnpacpi_parse_allocated_irqresource(struct pnp_resource_table *res,
83 while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) && 84 while (!(res->irq_resource[i].flags & IORESOURCE_UNSET) &&
84 i < PNP_MAX_IRQ) 85 i < PNP_MAX_IRQ)
85 i++; 86 i++;
86 if (i >= PNP_MAX_IRQ) { 87 if (i >= PNP_MAX_IRQ && !warned) {
87 printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ " 88 printk(KERN_ERR "pnpacpi: exceeded the max number of IRQ "
88 "resources: %d \n", PNP_MAX_IRQ); 89 "resources: %d \n", PNP_MAX_IRQ);
90 warned = 1;
89 return; 91 return;
90 } 92 }
91 /* 93 /*
@@ -169,6 +171,7 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res,
169 int bus_master, int transfer) 171 int bus_master, int transfer)
170{ 172{
171 int i = 0; 173 int i = 0;
174 static unsigned char warned;
172 175
173 while (i < PNP_MAX_DMA && 176 while (i < PNP_MAX_DMA &&
174 !(res->dma_resource[i].flags & IORESOURCE_UNSET)) 177 !(res->dma_resource[i].flags & IORESOURCE_UNSET))
@@ -183,9 +186,10 @@ static void pnpacpi_parse_allocated_dmaresource(struct pnp_resource_table *res,
183 } 186 }
184 res->dma_resource[i].start = dma; 187 res->dma_resource[i].start = dma;
185 res->dma_resource[i].end = dma; 188 res->dma_resource[i].end = dma;
186 } else { 189 } else if (!warned) {
187 printk(KERN_ERR "pnpacpi: exceeded the max number of DMA " 190 printk(KERN_ERR "pnpacpi: exceeded the max number of DMA "
188 "resources: %d \n", PNP_MAX_DMA); 191 "resources: %d \n", PNP_MAX_DMA);
192 warned = 1;
189 } 193 }
190} 194}
191 195
@@ -193,6 +197,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res,
193 u64 io, u64 len, int io_decode) 197 u64 io, u64 len, int io_decode)
194{ 198{
195 int i = 0; 199 int i = 0;
200 static unsigned char warned;
196 201
197 while (!(res->port_resource[i].flags & IORESOURCE_UNSET) && 202 while (!(res->port_resource[i].flags & IORESOURCE_UNSET) &&
198 i < PNP_MAX_PORT) 203 i < PNP_MAX_PORT)
@@ -207,7 +212,7 @@ static void pnpacpi_parse_allocated_ioresource(struct pnp_resource_table *res,
207 } 212 }
208 res->port_resource[i].start = io; 213 res->port_resource[i].start = io;
209 res->port_resource[i].end = io + len - 1; 214 res->port_resource[i].end = io + len - 1;
210 } else { 215 } else if (!warned) {
211 printk(KERN_ERR "pnpacpi: exceeded the max number of IO " 216 printk(KERN_ERR "pnpacpi: exceeded the max number of IO "
212 "resources: %d \n", PNP_MAX_PORT); 217 "resources: %d \n", PNP_MAX_PORT);
213 } 218 }
@@ -218,6 +223,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res,
218 int write_protect) 223 int write_protect)
219{ 224{
220 int i = 0; 225 int i = 0;
226 static unsigned char warned;
221 227
222 while (!(res->mem_resource[i].flags & IORESOURCE_UNSET) && 228 while (!(res->mem_resource[i].flags & IORESOURCE_UNSET) &&
223 (i < PNP_MAX_MEM)) 229 (i < PNP_MAX_MEM))
@@ -233,7 +239,7 @@ static void pnpacpi_parse_allocated_memresource(struct pnp_resource_table *res,
233 239
234 res->mem_resource[i].start = mem; 240 res->mem_resource[i].start = mem;
235 res->mem_resource[i].end = mem + len - 1; 241 res->mem_resource[i].end = mem + len - 1;
236 } else { 242 } else if (!warned) {
237 printk(KERN_ERR "pnpacpi: exceeded the max number of mem " 243 printk(KERN_ERR "pnpacpi: exceeded the max number of mem "
238 "resources: %d\n", PNP_MAX_MEM); 244 "resources: %d\n", PNP_MAX_MEM);
239 } 245 }
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 023656d2f1da..7f2215139e9a 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -2322,6 +2322,8 @@
2322#define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914 2322#define PCI_DEVICE_ID_INTEL_ICH9_4 0x2914
2323#define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919 2323#define PCI_DEVICE_ID_INTEL_ICH9_5 0x2919
2324#define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930 2324#define PCI_DEVICE_ID_INTEL_ICH9_6 0x2930
2325#define PCI_DEVICE_ID_INTEL_ICH9_7 0x2916
2326#define PCI_DEVICE_ID_INTEL_ICH9_8 0x2918
2325#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340 2327#define PCI_DEVICE_ID_INTEL_82855PM_HB 0x3340
2326#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575 2328#define PCI_DEVICE_ID_INTEL_82830_HB 0x3575
2327#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577 2329#define PCI_DEVICE_ID_INTEL_82830_CGC 0x3577
diff --git a/include/linux/pm.h b/include/linux/pm.h
index 09a309b7b5d2..b78e0295adf4 100644
--- a/include/linux/pm.h
+++ b/include/linux/pm.h
@@ -246,6 +246,15 @@ static inline int call_platform_enable_wakeup(struct device *dev, int is_on)
246 device_set_wakeup_enable(dev,val); \ 246 device_set_wakeup_enable(dev,val); \
247 } while(0) 247 } while(0)
248 248
249/*
250 * Global Power Management flags
251 * Used to keep APM and ACPI from both being active
252 */
253extern unsigned int pm_flags;
254
255#define PM_APM 1
256#define PM_ACPI 2
257
249#endif /* __KERNEL__ */ 258#endif /* __KERNEL__ */
250 259
251#endif /* _LINUX_PM_H */ 260#endif /* _LINUX_PM_H */
diff --git a/include/linux/pm_legacy.h b/include/linux/pm_legacy.h
index 514729a44688..446f4f42b952 100644
--- a/include/linux/pm_legacy.h
+++ b/include/linux/pm_legacy.h
@@ -4,10 +4,6 @@
4 4
5#ifdef CONFIG_PM_LEGACY 5#ifdef CONFIG_PM_LEGACY
6 6
7extern int pm_active;
8
9#define PM_IS_ACTIVE() (pm_active != 0)
10
11/* 7/*
12 * Register a device with power management 8 * Register a device with power management
13 */ 9 */
@@ -21,8 +17,6 @@ int __deprecated pm_send_all(pm_request_t rqst, void *data);
21 17
22#else /* CONFIG_PM_LEGACY */ 18#else /* CONFIG_PM_LEGACY */
23 19
24#define PM_IS_ACTIVE() 0
25
26static inline struct pm_dev *pm_register(pm_dev_t type, 20static inline struct pm_dev *pm_register(pm_dev_t type,
27 unsigned long id, 21 unsigned long id,
28 pm_callback callback) 22 pm_callback callback)
diff --git a/include/linux/pnp.h b/include/linux/pnp.h
index 0a0426c2867d..2a6d62c7d2d1 100644
--- a/include/linux/pnp.h
+++ b/include/linux/pnp.h
@@ -13,7 +13,7 @@
13#include <linux/errno.h> 13#include <linux/errno.h>
14#include <linux/mod_devicetable.h> 14#include <linux/mod_devicetable.h>
15 15
16#define PNP_MAX_PORT 24 16#define PNP_MAX_PORT 40
17#define PNP_MAX_MEM 12 17#define PNP_MAX_MEM 12
18#define PNP_MAX_IRQ 2 18#define PNP_MAX_IRQ 2
19#define PNP_MAX_DMA 2 19#define PNP_MAX_DMA 2
diff --git a/kernel/power/main.c b/kernel/power/main.c
index 3cdf95b1dc92..f71c9504a5c5 100644
--- a/kernel/power/main.c
+++ b/kernel/power/main.c
@@ -28,6 +28,9 @@ BLOCKING_NOTIFIER_HEAD(pm_chain_head);
28 28
29DEFINE_MUTEX(pm_mutex); 29DEFINE_MUTEX(pm_mutex);
30 30
31unsigned int pm_flags;
32EXPORT_SYMBOL(pm_flags);
33
31#ifdef CONFIG_SUSPEND 34#ifdef CONFIG_SUSPEND
32 35
33/* This is just an arbitrary number */ 36/* This is just an arbitrary number */
diff --git a/kernel/power/pm.c b/kernel/power/pm.c
index c50d15266c10..60c73fa670d5 100644
--- a/kernel/power/pm.c
+++ b/kernel/power/pm.c
@@ -27,8 +27,6 @@
27#include <linux/interrupt.h> 27#include <linux/interrupt.h>
28#include <linux/mutex.h> 28#include <linux/mutex.h>
29 29
30int pm_active;
31
32/* 30/*
33 * Locking notes: 31 * Locking notes:
34 * pm_devs_lock can be a semaphore providing pm ops are not called 32 * pm_devs_lock can be a semaphore providing pm ops are not called
@@ -204,6 +202,4 @@ int pm_send_all(pm_request_t rqst, void *data)
204 202
205EXPORT_SYMBOL(pm_register); 203EXPORT_SYMBOL(pm_register);
206EXPORT_SYMBOL(pm_send_all); 204EXPORT_SYMBOL(pm_send_all);
207EXPORT_SYMBOL(pm_active);
208
209 205