]> Pileus Git - ~andy/linux/commitdiff
Merge tag 'pm+acpi-fixes-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Feb 2013 05:25:17 +0000 (21:25 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 26 Feb 2013 05:25:17 +0000 (21:25 -0800)
Pull ACPI and power management fixes from Rafael Wysocki:

 - Fixes for blackfin and microblaze build problems introduced by the
   removal of global pm_idle.  From Lars-Peter Clausen.

 - OPP core build fix from Shawn Guo.

 - Error condition check fix for the new imx6q-cpufreq driver from Wei
   Yongjun.

 - Fix for an AER driver crash related to the lack of APEI
   initialization for acpi=off.  From Rafael J Wysocki.

 - Fix for a USB breakage on Thinkpad T430 related to ACPI power
   resources and PCI wakeup from Rafael J.  Wysocki.

* tag 'pm+acpi-fixes-3.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / PM: Take unusual configurations of power resources into account
  imx6q-cpufreq: fix return value check in imx6q_cpufreq_probe()
  PM / OPP: fix condition for empty of_init_opp_table()
  ACPI / APEI: Fix crash in apei_hest_parse() for acpi=off
  microblaze idle: Fix compile error
  blackfin idle: Fix compile error

1  2 
drivers/acpi/internal.h
drivers/acpi/scan.c

diff --combined drivers/acpi/internal.h
index c8b70b5b2814d273c204080734ec3dce8530cf42,4d77716ededdd50d16071b54b780d76ce113a580..3c94a732b4b37b23214823bfffdd4bf3c4ecb239
  
  int init_acpi_device_notify(void);
  int acpi_scan_init(void);
 +#ifdef        CONFIG_ACPI_PCI_SLOT
 +void acpi_pci_slot_init(void);
 +#else
 +static inline void acpi_pci_slot_init(void) { }
 +#endif
  void acpi_pci_root_init(void);
  void acpi_pci_link_init(void);
 +void acpi_pci_root_hp_init(void);
  void acpi_platform_init(void);
  int acpi_sysfs_init(void);
  void acpi_csrt_init(void);
@@@ -71,7 -65,7 +71,7 @@@ int acpi_extract_power_resources(union 
                                 struct list_head *list);
  int acpi_add_power_resource(acpi_handle handle);
  void acpi_power_add_remove_device(struct acpi_device *adev, bool add);
- int acpi_power_min_system_level(struct list_head *list);
+ int acpi_power_wakeup_list_init(struct list_head *list, int *system_level);
  int acpi_device_sleep_wake(struct acpi_device *dev,
                             int enable, int sleep_state, int dev_state);
  int acpi_power_get_inferred_state(struct acpi_device *device, int *state);
diff --combined drivers/acpi/scan.c
index 4be408756adc1df4e15eee0d237f06bfe3e5070e,1c6104c942c5ba5a8f6b556892e71a587a819e70..5e7e991717d76f97981fcff3d0a221879b47fcea
@@@ -1002,7 -1002,14 +1002,14 @@@ static int acpi_bus_extract_wakeup_devi
        if (!list_empty(&wakeup->resources)) {
                int sleep_state;
  
-               sleep_state = acpi_power_min_system_level(&wakeup->resources);
+               err = acpi_power_wakeup_list_init(&wakeup->resources,
+                                                 &sleep_state);
+               if (err) {
+                       acpi_handle_warn(handle, "Retrieving current states "
+                                        "of wakeup power resources failed\n");
+                       acpi_power_resources_list_free(&wakeup->resources);
+                       goto out;
+               }
                if (sleep_state < wakeup->sleep_state) {
                        acpi_handle_warn(handle, "Overriding _PRW sleep state "
                                         "(S%d) by S%d from power resources\n",
@@@ -1783,7 -1790,6 +1790,7 @@@ int __init acpi_scan_init(void
        acpi_platform_init();
        acpi_csrt_init();
        acpi_container_init();
 +      acpi_pci_slot_init();
  
        mutex_lock(&acpi_scan_lock);
        /*
  
        acpi_update_all_gpes();
  
 +      acpi_pci_root_hp_init();
 +
   out:
        mutex_unlock(&acpi_scan_lock);
        return result;