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 /drivers | |
| 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.
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/acpi/ac.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/battery.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/button.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/fan.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/power.c | 4 | ||||
| -rw-r--r-- | drivers/acpi/sbs.c | 2 | ||||
| -rw-r--r-- | drivers/acpi/thermal.c | 4 | ||||
| -rw-r--r-- | drivers/base/power/clock_ops.c | 3 | ||||
| -rw-r--r-- | drivers/base/power/common.c | 4 | ||||
| -rw-r--r-- | drivers/char/tpm/tpm_tis.c | 2 | ||||
| -rw-r--r-- | drivers/cpufreq/pcc-cpufreq.c | 1 | ||||
| -rw-r--r-- | drivers/platform/x86/classmate-laptop.c | 4 | ||||
| -rw-r--r-- | drivers/platform/x86/fujitsu-tablet.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/hdaps.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/hp_accel.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/msi-laptop.c | 4 | ||||
| -rw-r--r-- | drivers/platform/x86/panasonic-laptop.c | 4 | ||||
| -rw-r--r-- | drivers/platform/x86/sony-laptop.c | 12 | ||||
| -rw-r--r-- | drivers/platform/x86/thinkpad_acpi.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/toshiba_acpi.c | 2 | ||||
| -rw-r--r-- | drivers/platform/x86/toshiba_bluetooth.c | 4 | ||||
| -rw-r--r-- | drivers/platform/x86/xo15-ebook.c | 2 | ||||
| -rw-r--r-- | drivers/rtc/interface.c | 2 | ||||
| -rw-r--r-- | drivers/rtc/rtc-cmos.c | 1 |
24 files changed, 69 insertions, 8 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) | |||
| 803 | 806 | ||
| 804 | return result; | 807 | return result; |
| 805 | } | 808 | } |
| 809 | #endif | ||
| 806 | 810 | ||
| 807 | int __init acpi_power_init(void) | 811 | int __init acpi_power_init(void) |
| 808 | { | 812 | { |
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c index c0b9aa5faf4c..ff0740e0a9c2 100644 --- a/drivers/acpi/sbs.c +++ b/drivers/acpi/sbs.c | |||
| @@ -988,6 +988,7 @@ static void acpi_sbs_rmdirs(void) | |||
| 988 | #endif | 988 | #endif |
| 989 | } | 989 | } |
| 990 | 990 | ||
| 991 | #ifdef CONFIG_PM_SLEEP | ||
| 991 | static int acpi_sbs_resume(struct device *dev) | 992 | static int acpi_sbs_resume(struct device *dev) |
| 992 | { | 993 | { |
| 993 | struct acpi_sbs *sbs; | 994 | struct acpi_sbs *sbs; |
| @@ -997,6 +998,7 @@ static int acpi_sbs_resume(struct device *dev) | |||
| 997 | acpi_sbs_callback(sbs); | 998 | acpi_sbs_callback(sbs); |
| 998 | return 0; | 999 | return 0; |
| 999 | } | 1000 | } |
| 1001 | #endif | ||
| 1000 | 1002 | ||
| 1001 | static SIMPLE_DEV_PM_OPS(acpi_sbs_pm, NULL, acpi_sbs_resume); | 1003 | static SIMPLE_DEV_PM_OPS(acpi_sbs_pm, NULL, acpi_sbs_resume); |
| 1002 | 1004 | ||
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 9fe90e9fecb5..edda74a43406 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
| @@ -106,7 +106,9 @@ static const struct acpi_device_id thermal_device_ids[] = { | |||
| 106 | }; | 106 | }; |
| 107 | MODULE_DEVICE_TABLE(acpi, thermal_device_ids); | 107 | MODULE_DEVICE_TABLE(acpi, thermal_device_ids); |
| 108 | 108 | ||
| 109 | #ifdef CONFIG_PM_SLEEP | ||
| 109 | static int acpi_thermal_resume(struct device *dev); | 110 | static int acpi_thermal_resume(struct device *dev); |
| 111 | #endif | ||
| 110 | static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume); | 112 | static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume); |
| 111 | 113 | ||
| 112 | static struct acpi_driver acpi_thermal_driver = { | 114 | static struct acpi_driver acpi_thermal_driver = { |
| @@ -1041,6 +1043,7 @@ static int acpi_thermal_remove(struct acpi_device *device, int type) | |||
| 1041 | return 0; | 1043 | return 0; |
| 1042 | } | 1044 | } |
| 1043 | 1045 | ||
| 1046 | #ifdef CONFIG_PM_SLEEP | ||
| 1044 | static int acpi_thermal_resume(struct device *dev) | 1047 | static int acpi_thermal_resume(struct device *dev) |
| 1045 | { | 1048 | { |
| 1046 | struct acpi_thermal *tz; | 1049 | struct acpi_thermal *tz; |
| @@ -1075,6 +1078,7 @@ static int acpi_thermal_resume(struct device *dev) | |||
| 1075 | 1078 | ||
| 1076 | return AE_OK; | 1079 | return AE_OK; |
| 1077 | } | 1080 | } |
| 1081 | #endif | ||
| 1078 | 1082 | ||
| 1079 | static int thermal_act(const struct dmi_system_id *d) { | 1083 | static int thermal_act(const struct dmi_system_id *d) { |
| 1080 | 1084 | ||
diff --git a/drivers/base/power/clock_ops.c b/drivers/base/power/clock_ops.c index 869d7ff2227f..eb78e9640c4a 100644 --- a/drivers/base/power/clock_ops.c +++ b/drivers/base/power/clock_ops.c | |||
| @@ -169,8 +169,7 @@ void pm_clk_init(struct device *dev) | |||
| 169 | */ | 169 | */ |
| 170 | int pm_clk_create(struct device *dev) | 170 | int pm_clk_create(struct device *dev) |
| 171 | { | 171 | { |
| 172 | int ret = dev_pm_get_subsys_data(dev); | 172 | return dev_pm_get_subsys_data(dev); |
| 173 | return ret < 0 ? ret : 0; | ||
| 174 | } | 173 | } |
| 175 | 174 | ||
| 176 | /** | 175 | /** |
diff --git a/drivers/base/power/common.c b/drivers/base/power/common.c index a14085cc613f..39c32529b833 100644 --- a/drivers/base/power/common.c +++ b/drivers/base/power/common.c | |||
| @@ -24,7 +24,6 @@ | |||
| 24 | int dev_pm_get_subsys_data(struct device *dev) | 24 | int dev_pm_get_subsys_data(struct device *dev) |
| 25 | { | 25 | { |
| 26 | struct pm_subsys_data *psd; | 26 | struct pm_subsys_data *psd; |
| 27 | int ret = 0; | ||
| 28 | 27 | ||
| 29 | psd = kzalloc(sizeof(*psd), GFP_KERNEL); | 28 | psd = kzalloc(sizeof(*psd), GFP_KERNEL); |
| 30 | if (!psd) | 29 | if (!psd) |
| @@ -40,7 +39,6 @@ int dev_pm_get_subsys_data(struct device *dev) | |||
| 40 | dev->power.subsys_data = psd; | 39 | dev->power.subsys_data = psd; |
| 41 | pm_clk_init(dev); | 40 | pm_clk_init(dev); |
| 42 | psd = NULL; | 41 | psd = NULL; |
| 43 | ret = 1; | ||
| 44 | } | 42 | } |
| 45 | 43 | ||
| 46 | spin_unlock_irq(&dev->power.lock); | 44 | spin_unlock_irq(&dev->power.lock); |
| @@ -48,7 +46,7 @@ int dev_pm_get_subsys_data(struct device *dev) | |||
| 48 | /* kfree() verifies that its argument is nonzero. */ | 46 | /* kfree() verifies that its argument is nonzero. */ |
| 49 | kfree(psd); | 47 | kfree(psd); |
| 50 | 48 | ||
| 51 | return ret; | 49 | return 0; |
| 52 | } | 50 | } |
| 53 | EXPORT_SYMBOL_GPL(dev_pm_get_subsys_data); | 51 | EXPORT_SYMBOL_GPL(dev_pm_get_subsys_data); |
| 54 | 52 | ||
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 89682fa8801e..c4be3519a587 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
| @@ -807,6 +807,7 @@ module_param_string(hid, tpm_pnp_tbl[TIS_HID_USR_IDX].id, | |||
| 807 | MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe"); | 807 | MODULE_PARM_DESC(hid, "Set additional specific HID for this driver to probe"); |
| 808 | #endif | 808 | #endif |
| 809 | 809 | ||
| 810 | #ifdef CONFIG_PM_SLEEP | ||
| 810 | static int tpm_tis_resume(struct device *dev) | 811 | static int tpm_tis_resume(struct device *dev) |
| 811 | { | 812 | { |
| 812 | struct tpm_chip *chip = dev_get_drvdata(dev); | 813 | struct tpm_chip *chip = dev_get_drvdata(dev); |
| @@ -816,6 +817,7 @@ static int tpm_tis_resume(struct device *dev) | |||
| 816 | 817 | ||
| 817 | return tpm_pm_resume(dev); | 818 | return tpm_pm_resume(dev); |
| 818 | } | 819 | } |
| 820 | #endif | ||
| 819 | 821 | ||
| 820 | static SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume); | 822 | static SIMPLE_DEV_PM_OPS(tpm_tis_pm, tpm_pm_suspend, tpm_tis_resume); |
| 821 | 823 | ||
diff --git a/drivers/cpufreq/pcc-cpufreq.c b/drivers/cpufreq/pcc-cpufreq.c index cdc02ac8f41a..503996a94a6a 100644 --- a/drivers/cpufreq/pcc-cpufreq.c +++ b/drivers/cpufreq/pcc-cpufreq.c | |||
| @@ -454,6 +454,7 @@ static int __init pcc_cpufreq_probe(void) | |||
| 454 | mem_resource->address_length); | 454 | mem_resource->address_length); |
| 455 | if (pcch_virt_addr == NULL) { | 455 | if (pcch_virt_addr == NULL) { |
| 456 | pr_debug("probe: could not map shared mem region\n"); | 456 | pr_debug("probe: could not map shared mem region\n"); |
| 457 | ret = -ENOMEM; | ||
| 457 | goto out_free; | 458 | goto out_free; |
| 458 | } | 459 | } |
| 459 | pcch_hdr = pcch_virt_addr; | 460 | pcch_hdr = pcch_virt_addr; |
diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c index 2ca7dd1ab3e4..cd33add118ce 100644 --- a/drivers/platform/x86/classmate-laptop.c +++ b/drivers/platform/x86/classmate-laptop.c | |||
| @@ -350,6 +350,7 @@ static void cmpc_accel_idev_init_v4(struct input_dev *inputdev) | |||
| 350 | inputdev->close = cmpc_accel_close_v4; | 350 | inputdev->close = cmpc_accel_close_v4; |
| 351 | } | 351 | } |
| 352 | 352 | ||
| 353 | #ifdef CONFIG_PM_SLEEP | ||
| 353 | static int cmpc_accel_suspend_v4(struct device *dev) | 354 | static int cmpc_accel_suspend_v4(struct device *dev) |
| 354 | { | 355 | { |
| 355 | struct input_dev *inputdev; | 356 | struct input_dev *inputdev; |
| @@ -384,6 +385,7 @@ static int cmpc_accel_resume_v4(struct device *dev) | |||
| 384 | 385 | ||
| 385 | return 0; | 386 | return 0; |
| 386 | } | 387 | } |
| 388 | #endif | ||
| 387 | 389 | ||
| 388 | static int cmpc_accel_add_v4(struct acpi_device *acpi) | 390 | static int cmpc_accel_add_v4(struct acpi_device *acpi) |
| 389 | { | 391 | { |
| @@ -752,6 +754,7 @@ static int cmpc_tablet_remove(struct acpi_device *acpi, int type) | |||
| 752 | return cmpc_remove_acpi_notify_device(acpi); | 754 | return cmpc_remove_acpi_notify_device(acpi); |
| 753 | } | 755 | } |
| 754 | 756 | ||
| 757 | #ifdef CONFIG_PM_SLEEP | ||
| 755 | static int cmpc_tablet_resume(struct device *dev) | 758 | static int cmpc_tablet_resume(struct device *dev) |
| 756 | { | 759 | { |
| 757 | struct input_dev *inputdev = dev_get_drvdata(dev); | 760 | struct input_dev *inputdev = dev_get_drvdata(dev); |
| @@ -761,6 +764,7 @@ static int cmpc_tablet_resume(struct device *dev) | |||
| 761 | input_report_switch(inputdev, SW_TABLET_MODE, !val); | 764 | input_report_switch(inputdev, SW_TABLET_MODE, !val); |
| 762 | return 0; | 765 | return 0; |
| 763 | } | 766 | } |
| 767 | #endif | ||
| 764 | 768 | ||
| 765 | static SIMPLE_DEV_PM_OPS(cmpc_tablet_pm, NULL, cmpc_tablet_resume); | 769 | static SIMPLE_DEV_PM_OPS(cmpc_tablet_pm, NULL, cmpc_tablet_resume); |
| 766 | 770 | ||
diff --git a/drivers/platform/x86/fujitsu-tablet.c b/drivers/platform/x86/fujitsu-tablet.c index d2e41735a47b..7acae3f85f3b 100644 --- a/drivers/platform/x86/fujitsu-tablet.c +++ b/drivers/platform/x86/fujitsu-tablet.c | |||
| @@ -440,11 +440,13 @@ static int __devexit acpi_fujitsu_remove(struct acpi_device *adev, int type) | |||
| 440 | return 0; | 440 | return 0; |
| 441 | } | 441 | } |
| 442 | 442 | ||
| 443 | #ifdef CONFIG_PM_SLEEP | ||
| 443 | static int acpi_fujitsu_resume(struct device *dev) | 444 | static int acpi_fujitsu_resume(struct device *dev) |
| 444 | { | 445 | { |
| 445 | fujitsu_reset(); | 446 | fujitsu_reset(); |
| 446 | return 0; | 447 | return 0; |
| 447 | } | 448 | } |
| 449 | #endif | ||
| 448 | 450 | ||
| 449 | static SIMPLE_DEV_PM_OPS(acpi_fujitsu_pm, NULL, acpi_fujitsu_resume); | 451 | static SIMPLE_DEV_PM_OPS(acpi_fujitsu_pm, NULL, acpi_fujitsu_resume); |
| 450 | 452 | ||
diff --git a/drivers/platform/x86/hdaps.c b/drivers/platform/x86/hdaps.c index d9ab6f64dcec..777c7e3dda51 100644 --- a/drivers/platform/x86/hdaps.c +++ b/drivers/platform/x86/hdaps.c | |||
| @@ -305,10 +305,12 @@ static int hdaps_probe(struct platform_device *dev) | |||
| 305 | return 0; | 305 | return 0; |
| 306 | } | 306 | } |
| 307 | 307 | ||
| 308 | #ifdef CONFIG_PM_SLEEP | ||
| 308 | static int hdaps_resume(struct device *dev) | 309 | static int hdaps_resume(struct device *dev) |
| 309 | { | 310 | { |
| 310 | return hdaps_device_init(); | 311 | return hdaps_device_init(); |
| 311 | } | 312 | } |
| 313 | #endif | ||
| 312 | 314 | ||
| 313 | static SIMPLE_DEV_PM_OPS(hdaps_pm, NULL, hdaps_resume); | 315 | static SIMPLE_DEV_PM_OPS(hdaps_pm, NULL, hdaps_resume); |
| 314 | 316 | ||
diff --git a/drivers/platform/x86/hp_accel.c b/drivers/platform/x86/hp_accel.c index f4d91154ad67..6b9af989632b 100644 --- a/drivers/platform/x86/hp_accel.c +++ b/drivers/platform/x86/hp_accel.c | |||
| @@ -352,7 +352,7 @@ static int lis3lv02d_remove(struct acpi_device *device, int type) | |||
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | 354 | ||
| 355 | #ifdef CONFIG_PM | 355 | #ifdef CONFIG_PM_SLEEP |
| 356 | static int lis3lv02d_suspend(struct device *dev) | 356 | static int lis3lv02d_suspend(struct device *dev) |
| 357 | { | 357 | { |
| 358 | /* make sure the device is off when we suspend */ | 358 | /* make sure the device is off when we suspend */ |
diff --git a/drivers/platform/x86/msi-laptop.c b/drivers/platform/x86/msi-laptop.c index f64441844317..2111dbb7e1e3 100644 --- a/drivers/platform/x86/msi-laptop.c +++ b/drivers/platform/x86/msi-laptop.c | |||
| @@ -85,7 +85,9 @@ | |||
| 85 | #define MSI_STANDARD_EC_TOUCHPAD_ADDRESS 0xe4 | 85 | #define MSI_STANDARD_EC_TOUCHPAD_ADDRESS 0xe4 |
| 86 | #define MSI_STANDARD_EC_TOUCHPAD_MASK (1 << 4) | 86 | #define MSI_STANDARD_EC_TOUCHPAD_MASK (1 << 4) |
| 87 | 87 | ||
| 88 | #ifdef CONFIG_PM_SLEEP | ||
| 88 | static int msi_laptop_resume(struct device *device); | 89 | static int msi_laptop_resume(struct device *device); |
| 90 | #endif | ||
| 89 | static SIMPLE_DEV_PM_OPS(msi_laptop_pm, NULL, msi_laptop_resume); | 91 | static SIMPLE_DEV_PM_OPS(msi_laptop_pm, NULL, msi_laptop_resume); |
| 90 | 92 | ||
| 91 | #define MSI_STANDARD_EC_DEVICES_EXISTS_ADDRESS 0x2f | 93 | #define MSI_STANDARD_EC_DEVICES_EXISTS_ADDRESS 0x2f |
| @@ -753,6 +755,7 @@ err_bluetooth: | |||
| 753 | return retval; | 755 | return retval; |
| 754 | } | 756 | } |
| 755 | 757 | ||
| 758 | #ifdef CONFIG_PM_SLEEP | ||
| 756 | static int msi_laptop_resume(struct device *device) | 759 | static int msi_laptop_resume(struct device *device) |
| 757 | { | 760 | { |
| 758 | u8 data; | 761 | u8 data; |
| @@ -773,6 +776,7 @@ static int msi_laptop_resume(struct device *device) | |||
| 773 | 776 | ||
| 774 | return 0; | 777 | return 0; |
| 775 | } | 778 | } |
| 779 | #endif | ||
| 776 | 780 | ||
| 777 | static int __init msi_laptop_input_setup(void) | 781 | static int __init msi_laptop_input_setup(void) |
| 778 | { | 782 | { |
diff --git a/drivers/platform/x86/panasonic-laptop.c b/drivers/platform/x86/panasonic-laptop.c index 24480074bcf0..8e8caa767d6a 100644 --- a/drivers/platform/x86/panasonic-laptop.c +++ b/drivers/platform/x86/panasonic-laptop.c | |||
| @@ -188,7 +188,9 @@ static const struct acpi_device_id pcc_device_ids[] = { | |||
| 188 | }; | 188 | }; |
| 189 | MODULE_DEVICE_TABLE(acpi, pcc_device_ids); | 189 | MODULE_DEVICE_TABLE(acpi, pcc_device_ids); |
| 190 | 190 | ||
| 191 | #ifdef CONFIG_PM_SLEEP | ||
| 191 | static int acpi_pcc_hotkey_resume(struct device *dev); | 192 | static int acpi_pcc_hotkey_resume(struct device *dev); |
| 193 | #endif | ||
| 192 | static SIMPLE_DEV_PM_OPS(acpi_pcc_hotkey_pm, NULL, acpi_pcc_hotkey_resume); | 194 | static SIMPLE_DEV_PM_OPS(acpi_pcc_hotkey_pm, NULL, acpi_pcc_hotkey_resume); |
| 193 | 195 | ||
| 194 | static struct acpi_driver acpi_pcc_driver = { | 196 | static struct acpi_driver acpi_pcc_driver = { |
| @@ -540,6 +542,7 @@ static void acpi_pcc_destroy_input(struct pcc_acpi *pcc) | |||
| 540 | 542 | ||
| 541 | /* kernel module interface */ | 543 | /* kernel module interface */ |
| 542 | 544 | ||
| 545 | #ifdef CONFIG_PM_SLEEP | ||
| 543 | static int acpi_pcc_hotkey_resume(struct device *dev) | 546 | static int acpi_pcc_hotkey_resume(struct device *dev) |
| 544 | { | 547 | { |
| 545 | struct pcc_acpi *pcc; | 548 | struct pcc_acpi *pcc; |
| @@ -556,6 +559,7 @@ static int acpi_pcc_hotkey_resume(struct device *dev) | |||
| 556 | 559 | ||
| 557 | return acpi_pcc_write_sset(pcc, SINF_STICKY_KEY, pcc->sticky_mode); | 560 | return acpi_pcc_write_sset(pcc, SINF_STICKY_KEY, pcc->sticky_mode); |
| 558 | } | 561 | } |
| 562 | #endif | ||
| 559 | 563 | ||
| 560 | static int acpi_pcc_hotkey_add(struct acpi_device *device) | 564 | static int acpi_pcc_hotkey_add(struct acpi_device *device) |
| 561 | { | 565 | { |
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 9363969ad07a..daaddec68def 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
| @@ -140,7 +140,10 @@ MODULE_PARM_DESC(kbd_backlight_timeout, | |||
| 140 | "1 for 30 seconds, 2 for 60 seconds and 3 to disable timeout " | 140 | "1 for 30 seconds, 2 for 60 seconds and 3 to disable timeout " |
| 141 | "(default: 0)"); | 141 | "(default: 0)"); |
| 142 | 142 | ||
| 143 | #ifdef CONFIG_PM_SLEEP | ||
| 143 | static void sony_nc_kbd_backlight_resume(void); | 144 | static void sony_nc_kbd_backlight_resume(void); |
| 145 | static void sony_nc_thermal_resume(void); | ||
| 146 | #endif | ||
| 144 | static int sony_nc_kbd_backlight_setup(struct platform_device *pd, | 147 | static int sony_nc_kbd_backlight_setup(struct platform_device *pd, |
| 145 | unsigned int handle); | 148 | unsigned int handle); |
| 146 | static void sony_nc_kbd_backlight_cleanup(struct platform_device *pd); | 149 | static void sony_nc_kbd_backlight_cleanup(struct platform_device *pd); |
| @@ -151,7 +154,6 @@ static void sony_nc_battery_care_cleanup(struct platform_device *pd); | |||
| 151 | 154 | ||
| 152 | static int sony_nc_thermal_setup(struct platform_device *pd); | 155 | static int sony_nc_thermal_setup(struct platform_device *pd); |
| 153 | static void sony_nc_thermal_cleanup(struct platform_device *pd); | 156 | static void sony_nc_thermal_cleanup(struct platform_device *pd); |
| 154 | static void sony_nc_thermal_resume(void); | ||
| 155 | 157 | ||
| 156 | static int sony_nc_lid_resume_setup(struct platform_device *pd); | 158 | static int sony_nc_lid_resume_setup(struct platform_device *pd); |
| 157 | static void sony_nc_lid_resume_cleanup(struct platform_device *pd); | 159 | static void sony_nc_lid_resume_cleanup(struct platform_device *pd); |
| @@ -1431,6 +1433,7 @@ static void sony_nc_function_cleanup(struct platform_device *pd) | |||
| 1431 | sony_nc_handles_cleanup(pd); | 1433 | sony_nc_handles_cleanup(pd); |
| 1432 | } | 1434 | } |
| 1433 | 1435 | ||
| 1436 | #ifdef CONFIG_PM_SLEEP | ||
| 1434 | static void sony_nc_function_resume(void) | 1437 | static void sony_nc_function_resume(void) |
| 1435 | { | 1438 | { |
| 1436 | unsigned int i, result, bitmask, arg; | 1439 | unsigned int i, result, bitmask, arg; |
| @@ -1508,6 +1511,7 @@ static int sony_nc_resume(struct device *dev) | |||
| 1508 | 1511 | ||
| 1509 | return 0; | 1512 | return 0; |
| 1510 | } | 1513 | } |
| 1514 | #endif | ||
| 1511 | 1515 | ||
| 1512 | static SIMPLE_DEV_PM_OPS(sony_nc_pm, NULL, sony_nc_resume); | 1516 | static SIMPLE_DEV_PM_OPS(sony_nc_pm, NULL, sony_nc_resume); |
| 1513 | 1517 | ||
| @@ -1872,6 +1876,7 @@ static void sony_nc_kbd_backlight_cleanup(struct platform_device *pd) | |||
| 1872 | } | 1876 | } |
| 1873 | } | 1877 | } |
| 1874 | 1878 | ||
| 1879 | #ifdef CONFIG_PM_SLEEP | ||
| 1875 | static void sony_nc_kbd_backlight_resume(void) | 1880 | static void sony_nc_kbd_backlight_resume(void) |
| 1876 | { | 1881 | { |
| 1877 | int ignore = 0; | 1882 | int ignore = 0; |
| @@ -1888,6 +1893,7 @@ static void sony_nc_kbd_backlight_resume(void) | |||
| 1888 | (kbdbl_ctl->base + 0x200) | | 1893 | (kbdbl_ctl->base + 0x200) | |
| 1889 | (kbdbl_ctl->timeout << 0x10), &ignore); | 1894 | (kbdbl_ctl->timeout << 0x10), &ignore); |
| 1890 | } | 1895 | } |
| 1896 | #endif | ||
| 1891 | 1897 | ||
| 1892 | struct battery_care_control { | 1898 | struct battery_care_control { |
| 1893 | struct device_attribute attrs[2]; | 1899 | struct device_attribute attrs[2]; |
| @@ -2210,6 +2216,7 @@ static void sony_nc_thermal_cleanup(struct platform_device *pd) | |||
| 2210 | } | 2216 | } |
| 2211 | } | 2217 | } |
| 2212 | 2218 | ||
| 2219 | #ifdef CONFIG_PM_SLEEP | ||
| 2213 | static void sony_nc_thermal_resume(void) | 2220 | static void sony_nc_thermal_resume(void) |
| 2214 | { | 2221 | { |
| 2215 | unsigned int status = sony_nc_thermal_mode_get(); | 2222 | unsigned int status = sony_nc_thermal_mode_get(); |
| @@ -2217,6 +2224,7 @@ static void sony_nc_thermal_resume(void) | |||
| 2217 | if (status != th_handle->mode) | 2224 | if (status != th_handle->mode) |
| 2218 | sony_nc_thermal_mode_set(th_handle->mode); | 2225 | sony_nc_thermal_mode_set(th_handle->mode); |
| 2219 | } | 2226 | } |
| 2227 | #endif | ||
| 2220 | 2228 | ||
| 2221 | /* resume on LID open */ | 2229 | /* resume on LID open */ |
| 2222 | struct snc_lid_resume_control { | 2230 | struct snc_lid_resume_control { |
| @@ -4287,6 +4295,7 @@ err_free_resources: | |||
| 4287 | return result; | 4295 | return result; |
| 4288 | } | 4296 | } |
| 4289 | 4297 | ||
| 4298 | #ifdef CONFIG_PM_SLEEP | ||
| 4290 | static int sony_pic_suspend(struct device *dev) | 4299 | static int sony_pic_suspend(struct device *dev) |
| 4291 | { | 4300 | { |
| 4292 | if (sony_pic_disable(to_acpi_device(dev))) | 4301 | if (sony_pic_disable(to_acpi_device(dev))) |
| @@ -4300,6 +4309,7 @@ static int sony_pic_resume(struct device *dev) | |||
| 4300 | spic_dev.cur_ioport, spic_dev.cur_irq); | 4309 | spic_dev.cur_ioport, spic_dev.cur_irq); |
| 4301 | return 0; | 4310 | return 0; |
| 4302 | } | 4311 | } |
| 4312 | #endif | ||
| 4303 | 4313 | ||
| 4304 | static SIMPLE_DEV_PM_OPS(sony_pic_pm, sony_pic_suspend, sony_pic_resume); | 4314 | static SIMPLE_DEV_PM_OPS(sony_pic_pm, sony_pic_suspend, sony_pic_resume); |
| 4305 | 4315 | ||
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index e7f73287636c..f28f36ccdcf4 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c | |||
| @@ -922,6 +922,7 @@ static struct input_dev *tpacpi_inputdev; | |||
| 922 | static struct mutex tpacpi_inputdev_send_mutex; | 922 | static struct mutex tpacpi_inputdev_send_mutex; |
| 923 | static LIST_HEAD(tpacpi_all_drivers); | 923 | static LIST_HEAD(tpacpi_all_drivers); |
| 924 | 924 | ||
| 925 | #ifdef CONFIG_PM_SLEEP | ||
| 925 | static int tpacpi_suspend_handler(struct device *dev) | 926 | static int tpacpi_suspend_handler(struct device *dev) |
| 926 | { | 927 | { |
| 927 | struct ibm_struct *ibm, *itmp; | 928 | struct ibm_struct *ibm, *itmp; |
| @@ -949,6 +950,7 @@ static int tpacpi_resume_handler(struct device *dev) | |||
| 949 | 950 | ||
| 950 | return 0; | 951 | return 0; |
| 951 | } | 952 | } |
| 953 | #endif | ||
| 952 | 954 | ||
| 953 | static SIMPLE_DEV_PM_OPS(tpacpi_pm, | 955 | static SIMPLE_DEV_PM_OPS(tpacpi_pm, |
| 954 | tpacpi_suspend_handler, tpacpi_resume_handler); | 956 | tpacpi_suspend_handler, tpacpi_resume_handler); |
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c index c13ba5bac93f..5f1256d5e933 100644 --- a/drivers/platform/x86/toshiba_acpi.c +++ b/drivers/platform/x86/toshiba_acpi.c | |||
| @@ -1296,6 +1296,7 @@ static void toshiba_acpi_notify(struct acpi_device *acpi_dev, u32 event) | |||
| 1296 | } | 1296 | } |
| 1297 | } | 1297 | } |
| 1298 | 1298 | ||
| 1299 | #ifdef CONFIG_PM_SLEEP | ||
| 1299 | static int toshiba_acpi_suspend(struct device *device) | 1300 | static int toshiba_acpi_suspend(struct device *device) |
| 1300 | { | 1301 | { |
| 1301 | struct toshiba_acpi_dev *dev = acpi_driver_data(to_acpi_device(device)); | 1302 | struct toshiba_acpi_dev *dev = acpi_driver_data(to_acpi_device(device)); |
| @@ -1317,6 +1318,7 @@ static int toshiba_acpi_resume(struct device *device) | |||
| 1317 | 1318 | ||
| 1318 | return 0; | 1319 | return 0; |
| 1319 | } | 1320 | } |
| 1321 | #endif | ||
| 1320 | 1322 | ||
| 1321 | static SIMPLE_DEV_PM_OPS(toshiba_acpi_pm, | 1323 | static SIMPLE_DEV_PM_OPS(toshiba_acpi_pm, |
| 1322 | toshiba_acpi_suspend, toshiba_acpi_resume); | 1324 | toshiba_acpi_suspend, toshiba_acpi_resume); |
diff --git a/drivers/platform/x86/toshiba_bluetooth.c b/drivers/platform/x86/toshiba_bluetooth.c index 715a43cb5e3c..5e5d6317d690 100644 --- a/drivers/platform/x86/toshiba_bluetooth.c +++ b/drivers/platform/x86/toshiba_bluetooth.c | |||
| @@ -41,7 +41,9 @@ static const struct acpi_device_id bt_device_ids[] = { | |||
| 41 | }; | 41 | }; |
| 42 | MODULE_DEVICE_TABLE(acpi, bt_device_ids); | 42 | MODULE_DEVICE_TABLE(acpi, bt_device_ids); |
| 43 | 43 | ||
| 44 | #ifdef CONFIG_PM_SLEEP | ||
| 44 | static int toshiba_bt_resume(struct device *dev); | 45 | static int toshiba_bt_resume(struct device *dev); |
| 46 | #endif | ||
| 45 | static SIMPLE_DEV_PM_OPS(toshiba_bt_pm, NULL, toshiba_bt_resume); | 47 | static SIMPLE_DEV_PM_OPS(toshiba_bt_pm, NULL, toshiba_bt_resume); |
| 46 | 48 | ||
| 47 | static struct acpi_driver toshiba_bt_rfkill_driver = { | 49 | static struct acpi_driver toshiba_bt_rfkill_driver = { |
| @@ -90,10 +92,12 @@ static void toshiba_bt_rfkill_notify(struct acpi_device *device, u32 event) | |||
| 90 | toshiba_bluetooth_enable(device->handle); | 92 | toshiba_bluetooth_enable(device->handle); |
| 91 | } | 93 | } |
| 92 | 94 | ||
| 95 | #ifdef CONFIG_PM_SLEEP | ||
| 93 | static int toshiba_bt_resume(struct device *dev) | 96 | static int toshiba_bt_resume(struct device *dev) |
| 94 | { | 97 | { |
| 95 | return toshiba_bluetooth_enable(to_acpi_device(dev)->handle); | 98 | return toshiba_bluetooth_enable(to_acpi_device(dev)->handle); |
| 96 | } | 99 | } |
| 100 | #endif | ||
| 97 | 101 | ||
| 98 | static int toshiba_bt_rfkill_add(struct acpi_device *device) | 102 | static int toshiba_bt_rfkill_add(struct acpi_device *device) |
| 99 | { | 103 | { |
diff --git a/drivers/platform/x86/xo15-ebook.c b/drivers/platform/x86/xo15-ebook.c index 849c07c13bf6..38ba39d7ca7d 100644 --- a/drivers/platform/x86/xo15-ebook.c +++ b/drivers/platform/x86/xo15-ebook.c | |||
| @@ -77,10 +77,12 @@ static void ebook_switch_notify(struct acpi_device *device, u32 event) | |||
| 77 | } | 77 | } |
| 78 | } | 78 | } |
| 79 | 79 | ||
| 80 | #ifdef CONFIG_PM_SLEEP | ||
| 80 | static int ebook_switch_resume(struct device *dev) | 81 | static int ebook_switch_resume(struct device *dev) |
| 81 | { | 82 | { |
| 82 | return ebook_send_state(to_acpi_device(dev)); | 83 | return ebook_send_state(to_acpi_device(dev)); |
| 83 | } | 84 | } |
| 85 | #endif | ||
| 84 | 86 | ||
| 85 | static SIMPLE_DEV_PM_OPS(ebook_switch_pm, NULL, ebook_switch_resume); | 87 | static SIMPLE_DEV_PM_OPS(ebook_switch_pm, NULL, ebook_switch_resume); |
| 86 | 88 | ||
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index eb415bd76494..9592b936b71b 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
| @@ -582,6 +582,7 @@ enum hrtimer_restart rtc_pie_update_irq(struct hrtimer *timer) | |||
| 582 | void rtc_update_irq(struct rtc_device *rtc, | 582 | void rtc_update_irq(struct rtc_device *rtc, |
| 583 | unsigned long num, unsigned long events) | 583 | unsigned long num, unsigned long events) |
| 584 | { | 584 | { |
| 585 | pm_stay_awake(rtc->dev.parent); | ||
| 585 | schedule_work(&rtc->irqwork); | 586 | schedule_work(&rtc->irqwork); |
| 586 | } | 587 | } |
| 587 | EXPORT_SYMBOL_GPL(rtc_update_irq); | 588 | EXPORT_SYMBOL_GPL(rtc_update_irq); |
| @@ -844,6 +845,7 @@ void rtc_timer_do_work(struct work_struct *work) | |||
| 844 | 845 | ||
| 845 | mutex_lock(&rtc->ops_lock); | 846 | mutex_lock(&rtc->ops_lock); |
| 846 | again: | 847 | again: |
| 848 | pm_relax(rtc->dev.parent); | ||
| 847 | __rtc_read_time(rtc, &tm); | 849 | __rtc_read_time(rtc, &tm); |
| 848 | now = rtc_tm_to_ktime(tm); | 850 | now = rtc_tm_to_ktime(tm); |
| 849 | while ((next = timerqueue_getnext(&rtc->timerqueue))) { | 851 | while ((next = timerqueue_getnext(&rtc->timerqueue))) { |
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c index 132333d75408..4267789ca995 100644 --- a/drivers/rtc/rtc-cmos.c +++ b/drivers/rtc/rtc-cmos.c | |||
| @@ -568,7 +568,6 @@ static irqreturn_t cmos_interrupt(int irq, void *p) | |||
| 568 | hpet_mask_rtc_irq_bit(RTC_AIE); | 568 | hpet_mask_rtc_irq_bit(RTC_AIE); |
| 569 | 569 | ||
| 570 | CMOS_READ(RTC_INTR_FLAGS); | 570 | CMOS_READ(RTC_INTR_FLAGS); |
| 571 | pm_wakeup_event(cmos_rtc.dev, 0); | ||
| 572 | } | 571 | } |
| 573 | spin_unlock(&rtc_lock); | 572 | spin_unlock(&rtc_lock); |
| 574 | 573 | ||
