aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-08-12 14:34:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-08-12 14:34:09 -0400
commite4e139bebd9cc2c867950ad8ea6814e542dbcc6f (patch)
tree269b6fa6014b06aac70b4e2fbfc2299b2fd09fbc /drivers/acpi
parent88de3d0d714bff03b2e0a3fcd5b8b346a392e9ea (diff)
parent07368d32f1a67e797def08cf2ee3ea1647b204b6 (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/acpi')
-rw-r--r--drivers/acpi/ac.c4
-rw-r--r--drivers/acpi/battery.c2
-rw-r--r--drivers/acpi/button.c4
-rw-r--r--drivers/acpi/fan.c4
-rw-r--r--drivers/acpi/power.c4
-rw-r--r--drivers/acpi/sbs.c2
-rw-r--r--drivers/acpi/thermal.c4
7 files changed, 24 insertions, 0 deletions
diff --git a/drivers/acpi/ac.c b/drivers/acpi/ac.c
index ac7034129f3..d5fdd36190c 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};
70MODULE_DEVICE_TABLE(acpi, ac_device_ids); 70MODULE_DEVICE_TABLE(acpi, ac_device_ids);
71 71
72#ifdef CONFIG_PM_SLEEP
72static int acpi_ac_resume(struct device *dev); 73static int acpi_ac_resume(struct device *dev);
74#endif
73static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume); 75static SIMPLE_DEV_PM_OPS(acpi_ac_pm, NULL, acpi_ac_resume);
74 76
75static struct acpi_driver acpi_ac_driver = { 77static 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
316static int acpi_ac_resume(struct device *dev) 319static 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
336static int acpi_ac_remove(struct acpi_device *device, int type) 340static 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 ff2c876ec41..45e3e1759fb 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 */
1056static int acpi_battery_resume(struct device *dev) 1057static 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
1072static SIMPLE_DEV_PM_OPS(acpi_battery_pm, NULL, acpi_battery_resume); 1074static 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 79d4c22f7a6..314a3b84bbc 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -78,7 +78,9 @@ static int acpi_button_add(struct acpi_device *device);
78static int acpi_button_remove(struct acpi_device *device, int type); 78static int acpi_button_remove(struct acpi_device *device, int type);
79static void acpi_button_notify(struct acpi_device *device, u32 event); 79static void acpi_button_notify(struct acpi_device *device, u32 event);
80 80
81#ifdef CONFIG_PM_SLEEP
81static int acpi_button_resume(struct device *dev); 82static int acpi_button_resume(struct device *dev);
83#endif
82static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); 84static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume);
83 85
84static struct acpi_driver acpi_button_driver = { 86static 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
313static int acpi_button_resume(struct device *dev) 316static 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
323static int acpi_button_add(struct acpi_device *device) 327static int acpi_button_add(struct acpi_device *device)
324{ 328{
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 669d9ee80d1..bc36a476f1a 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};
54MODULE_DEVICE_TABLE(acpi, fan_device_ids); 54MODULE_DEVICE_TABLE(acpi, fan_device_ids);
55 55
56#ifdef CONFIG_PM_SLEEP
56static int acpi_fan_suspend(struct device *dev); 57static int acpi_fan_suspend(struct device *dev);
57static int acpi_fan_resume(struct device *dev); 58static int acpi_fan_resume(struct device *dev);
59#endif
58static SIMPLE_DEV_PM_OPS(acpi_fan_pm, acpi_fan_suspend, acpi_fan_resume); 60static SIMPLE_DEV_PM_OPS(acpi_fan_pm, acpi_fan_suspend, acpi_fan_resume);
59 61
60static struct acpi_driver acpi_fan_driver = { 62static 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
187static int acpi_fan_suspend(struct device *dev) 190static 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
211static int __init acpi_fan_init(void) 215static int __init acpi_fan_init(void)
212{ 216{
diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
index 215ecd09740..fc180341462 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};
68MODULE_DEVICE_TABLE(acpi, power_device_ids); 68MODULE_DEVICE_TABLE(acpi, power_device_ids);
69 69
70#ifdef CONFIG_PM_SLEEP
70static int acpi_power_resume(struct device *dev); 71static int acpi_power_resume(struct device *dev);
72#endif
71static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume); 73static SIMPLE_DEV_PM_OPS(acpi_power_pm, NULL, acpi_power_resume);
72 74
73static struct acpi_driver acpi_power_driver = { 75static 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
778static int acpi_power_resume(struct device *dev) 781static 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
807int __init acpi_power_init(void) 811int __init acpi_power_init(void)
808{ 812{
diff --git a/drivers/acpi/sbs.c b/drivers/acpi/sbs.c
index c0b9aa5faf4..ff0740e0a9c 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
991static int acpi_sbs_resume(struct device *dev) 992static 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
1001static SIMPLE_DEV_PM_OPS(acpi_sbs_pm, NULL, acpi_sbs_resume); 1003static 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 9fe90e9fecb..edda74a4340 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};
107MODULE_DEVICE_TABLE(acpi, thermal_device_ids); 107MODULE_DEVICE_TABLE(acpi, thermal_device_ids);
108 108
109#ifdef CONFIG_PM_SLEEP
109static int acpi_thermal_resume(struct device *dev); 110static int acpi_thermal_resume(struct device *dev);
111#endif
110static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume); 112static SIMPLE_DEV_PM_OPS(acpi_thermal_pm, NULL, acpi_thermal_resume);
111 113
112static struct acpi_driver acpi_thermal_driver = { 114static 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
1044static int acpi_thermal_resume(struct device *dev) 1047static 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
1079static int thermal_act(const struct dmi_system_id *d) { 1083static int thermal_act(const struct dmi_system_id *d) {
1080 1084