diff options
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 |
7 files changed, 24 insertions, 0 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 | ||
