diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-12 14:34:09 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-08-12 14:34:09 -0400 |
| commit | e4e139bebd9cc2c867950ad8ea6814e542dbcc6f (patch) | |
| tree | 269b6fa6014b06aac70b4e2fbfc2299b2fd09fbc | |
| parent | 88de3d0d714bff03b2e0a3fcd5b8b346a392e9ea (diff) | |
| parent | 07368d32f1a67e797def08cf2ee3ea1647b204b6 (diff) | |
Merge tag 'pm-for-3.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Pull power management fixes from Rafael J. Wysocki:
- Fix for two recent regressions in the generic PM domains framework.
- Revert of a commit that introduced a resume regression and is
conceptually incorrect in my opinion.
- Fix for a return value in pcc-cpufreq.c from Julia Lawall.
- RTC wakeup signaling fix from Neil Brown.
- Suppression of compiler warnings for CONFIG_PM_SLEEP unset in ACPI,
platform/x86 and TPM drivers.
* tag 'pm-for-3.6-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
tpm_tis / PM: Fix unused function warning for CONFIG_PM_SLEEP
platform / x86 / PM: Fix unused function warnings for CONFIG_PM_SLEEP
ACPI / PM: Fix unused function warnings for CONFIG_PM_SLEEP
Revert "NMI watchdog: fix for lockup detector breakage on resume"
PM: Make dev_pm_get_subsys_data() always return 0 on success
drivers/cpufreq/pcc-cpufreq.c: fix error return code
RTC: Avoid races between RTC alarm wakeup and suspend.
27 files changed, 71 insertions, 38 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c index ac7034129f3f..d5fdd36190cc 100644 --- a/drivers/acpi/ac.c +++ b/drivers/acpi/ac.c | |||
| @@ -69,7 +69,9 @@ static const struct acpi_device_id ac_device_ids[] = { | |||
| 69 | }; | 69 | }; |
| 70 | MODULE_DEVICE_TABLE(acpi, ac_device_ids); | 70 | MODULE_DEVICE_TABLE(acpi, ac_device_ids); |
| 71 | 71 | ||
| 72 | #ifdef CONFIG_PM_SLEEP | ||
| 72 | static int acpi_ac_resume(struct device *dev); | 73 | static int acpi_ac_resume(struct device *dev); |
| 74 | #endif | ||
| 73 | static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume); | 75 | static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume); |
| 74 | 76 | ||
| 75 | static struct acpi_driver acpi_ac_driver = { | 77 | static struct acpi_driver acpi_ac_driver = { |
| @@ -313,6 +315,7 @@ static int acpi_ac_add(struct acpi_device *device) | |||
| 313 | return result; | 315 | return result; |
| 314 | } | 316 | } |
| 315 | 317 | ||
| 318 | #ifdef CONFIG_PM_SLEEP | ||
| 316 | static int acpi_ac_resume(struct device *dev) | 319 | static int acpi_ac_resume(struct device *dev) |
| 317 | { | 320 | { |
| 318 | struct acpi_ac *ac; | 321 | struct acpi_ac *ac; |
| @@ -332,6 +335,7 @@ static int acpi_ac_resume(struct device *dev) | |||
| 332 | kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); | 335 | kobject_uevent(&ac->charger.dev->kobj, KOBJ_CHANGE); |
| 333 | return 0; | 336 | return 0; |
| 334 | } | 337 | } |
| 338 | #endif | ||
| 335 | 339 | ||
| 336 | static int acpi_ac_remove(struct acpi_device *device, int type) | 340 | static int acpi_ac_remove(struct acpi_device *device, int type) |
| 337 | { | 341 | { |
diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index ff2c876ec412..45e3e1759fb8 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c | |||
| @@ -1052,6 +1052,7 @@ static int acpi_battery_remove(struct acpi_device *device, int type) | |||
| 1052 | return 0; | 1052 | return 0; |
| 1053 | } | 1053 | } |
| 1054 | 1054 | ||
| 1055 | #ifdef CONFIG_PM_SLEEP | ||
| 1055 | /* this is needed to learn about changes made in suspended state */ | 1056 | /* this is needed to learn about changes made in suspended state */ |
| 1056 | static int acpi_battery_resume(struct device *dev) | 1057 | static int acpi_battery_resume(struct device *dev) |
| 1057 | { | 1058 | { |
| @@ -1068,6 +1069,7 @@ static int acpi_battery_resume(struct device *dev) | |||
| 1068 | acpi_battery_update(battery); | 1069 | acpi_battery_update(battery); |
| 1069 | return 0; | 1070 | return 0; |
| 1070 | } | 1071 | } |
| 1072 | #endif | ||
| 1071 | 1073 | ||
| 1072 | static SIMPLE_DEV_PM_OPS(acpi_battery_pm, NULL, acpi_battery_resume); | 1074 | static SIMPLE_DEV_PM_OPS(acpi_battery_pm, NULL, acpi_battery_resume); |
| 1073 | 1075 | ||
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 79d4c22f7a6d..314a3b84bbc7 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
| @@ -78,7 +78,9 @@ static int acpi_button_add(struct acpi_device *device); | |||
| 78 | static int acpi_button_remove(struct acpi_device *device, int type); | 78 | static int acpi_button_remove(struct acpi_device *device, int type); |
| 79 | static void acpi_button_notify(struct acpi_device *device, u32 event); | 79 | static void acpi_button_notify(struct acpi_device *device, u32 event); |
| 80 | 80 | ||
| 81 | #ifdef CONFIG_PM_SLEEP | ||
| 81 | static int acpi_button_resume(struct device *dev); | 82 | static int acpi_button_resume(struct device *dev); |
| 83 | #endif | ||
| 82 | static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); | 84 | static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); |
| 83 | 85 | ||
| 84 | static struct acpi_driver acpi_button_driver = { | 86 | static struct acpi_driver acpi_button_driver = { |
| @@ -310,6 +312,7 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) | |||
| 310 | } | 312 | } |
| 311 | } | 313 | } |
| 312 | 314 | ||
| 315 | #ifdef CONFIG_PM_SLEEP | ||
| 313 | static int acpi_button_resume(struct device *dev) | 316 | static int acpi_button_resume(struct device *dev) |
| 314 | { | 317 | { |
| 315 | struct acpi_device *device = to_acpi_device(dev); | 318 | struct acpi_device *device = to_acpi_device(dev); |
| @@ -319,6 +322,7 @@ static int acpi_button_resume(struct device *dev) | |||
| 319 | return acpi_lid_send_state(device); | 322 | return acpi_lid_send_state(device); |
| 320 | return 0; | 323 | return 0; |
| 321 | } | 324 | } |
| 325 | #endif | ||
| 322 | 326 | ||
| 323 | static int acpi_button_add(struct acpi_device *device) | 327 | static int acpi_button_add(struct acpi_device *device) |
| 324 | { | 328 | { |
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c index 669d9ee80d16..bc36a476f1ab 100644 --- a/drivers/acpi/fan.c +++ b/drivers/acpi/fan.c | |||
| @@ -53,8 +53,10 @@ static const struct acpi_device_id fan_device_ids[] = { | |||
| 53 | }; | 53 | }; |
| 54 | MODULE_DEVICE_TABLE(acpi, fan_device_ids); | 54 | MODULE_DEVICE_TABLE(acpi, fan_device_ids); |
| 55 | 55 | ||
| 56 | #ifdef CONFIG_PM_SLEEP | ||
| 56 | static int acpi_fan_suspend(struct device *dev); | 57 | static int acpi_fan_suspend(struct device *dev); |
| 57 | static int acpi_fan_resume(struct device *dev); | 58 | static int acpi_fan_resume(struct device *dev); |
| 59 | #endif | ||
| 58 | static SIMPLE_DEV_PM_OPS(acpi_fan_pm, acpi_fan_suspend, acpi_fan_resume); | 60 | static SIMPLE_DEV_PM_OPS(acpi_fan_pm, acpi_fan_suspend, acpi_fan_resume); |
| 59 | 61 | ||
| 60 | static struct acpi_driver acpi_fan_driver = { | 62 | static struct acpi_driver acpi_fan_driver = { |
| @@ -184,6 +186,7 @@ static int acpi_fan_remove(struct acpi_device *device, int type) | |||
| 184 | return 0; | 186 | return 0; |
| 185 | } | 187 | } |
| 186 | 188 | ||
| 189 | #ifdef CONFIG_PM_SLEEP | ||
| 187 | static int acpi_fan_suspend(struct device *dev) | 190 | static int acpi_fan_suspend(struct device *dev) |
| 188 | { | 191 | { |
| 189 | if (!dev) | 192 | if (!dev) |
| @@ -207,6 +210,7 @@ static int acpi_fan_resume(struct device *dev) | |||
| 207 | 210 | ||
| 208 | return result; | 211 | return result; |
| 209 | } | 212 | } |
| 213 | #endif | ||
| 210 | 214 | ||
| 211 | static int __init acpi_fan_init(void) | 215 | static int __init acpi_fan_init(void) |
| 212 | { | 216 | { |
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 215ecd097408..fc1803414629 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c | |||
| @@ -67,7 +67,9 @@ static const struct acpi_device_id power_device_ids[] = { | |||
| 67 | }; | 67 | }; |
| 68 | MODULE_DEVICE_TABLE(acpi, power_device_ids); | 68 | MODULE_DEVICE_TABLE(acpi, power_device_ids); |
| 69 | 69 | ||
| 70 | #ifdef CONFIG_PM_SLEEP | ||
| 70 | static int acpi_power_resume(struct device *dev); | 71 | static int acpi_power_resume(struct device *dev); |
| 72 | #endif | ||
| 71 | static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume); | 73 | static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume); |
| 72 | 74 | ||
| 73 | static struct acpi_driver acpi_power_driver = { | 75 | static struct acpi_driver acpi_power_driver = { |
| @@ -775,6 +777,7 @@ static int acpi_power_remove(struct acpi_device *device, int type) | |||
| 775 | return 0; | 777 | return 0; |
| 776 | } | 778 | } |
| 777 | 779 | ||
| 780 | #ifdef CONFIG_PM_SLEEP | ||
| 778 | static int acpi_power_resume(struct device *dev) | 781 | static int acpi_power_resume(struct device *dev) |
| 779 | { | 782 | { |
| 780 | int result = 0, state; | 783 | int result = 0, state; |
| @@ -803,6 +806,7 @@ static int acpi_power_resume(struct device *dev) | |||
