diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2012-06-27 17:26:26 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2012-07-01 07:31:00 -0400 |
commit | e8110b64af8b7cce96d1878276770c76cb9c01d5 (patch) | |
tree | 8a433a4fda149d49a59d34d7e26022f6d5dc36fd | |
parent | 167cffb646aa4a7f3267b07eae1af16b54bc0e9b (diff) |
ACPI: Use struct dev_pm_ops for power management in processor driver
Make the ACPI processor driver define its PM callbacks through
a struct dev_pm_ops object rather than by using legacy PM hooks
in struct acpi_device_ops.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r-- | drivers/acpi/processor_driver.c | 6 | ||||
-rw-r--r-- | drivers/acpi/processor_idle.c | 4 | ||||
-rw-r--r-- | include/acpi/processor.h | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 0734086537b8..13103aeb0c4f 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -93,6 +93,9 @@ static const struct acpi_device_id processor_device_ids[] = { | |||
93 | }; | 93 | }; |
94 | MODULE_DEVICE_TABLE(acpi, processor_device_ids); | 94 | MODULE_DEVICE_TABLE(acpi, processor_device_ids); |
95 | 95 | ||
96 | static SIMPLE_DEV_PM_OPS(acpi_processor_pm, | ||
97 | acpi_processor_suspend, acpi_processor_resume); | ||
98 | |||
96 | static struct acpi_driver acpi_processor_driver = { | 99 | static struct acpi_driver acpi_processor_driver = { |
97 | .name = "processor", | 100 | .name = "processor", |
98 | .class = ACPI_PROCESSOR_CLASS, | 101 | .class = ACPI_PROCESSOR_CLASS, |
@@ -100,10 +103,9 @@ static struct acpi_driver acpi_processor_driver = { | |||
100 | .ops = { | 103 | .ops = { |
101 | .add = acpi_processor_add, | 104 | .add = acpi_processor_add, |
102 | .remove = acpi_processor_remove, | 105 | .remove = acpi_processor_remove, |
103 | .suspend = acpi_processor_suspend, | ||
104 | .resume = acpi_processor_resume, | ||
105 | .notify = acpi_processor_notify, | 106 | .notify = acpi_processor_notify, |
106 | }, | 107 | }, |
108 | .drv.pm = &acpi_processor_pm, | ||
107 | }; | 109 | }; |
108 | 110 | ||
109 | #define INSTALL_NOTIFY_HANDLER 1 | 111 | #define INSTALL_NOTIFY_HANDLER 1 |
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c index e28af8d38239..6d9ec3e0b52e 100644 --- a/drivers/acpi/processor_idle.c +++ b/drivers/acpi/processor_idle.c | |||
@@ -241,7 +241,7 @@ static void acpi_idle_bm_rld_restore(void) | |||
241 | acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld); | 241 | acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, saved_bm_rld); |
242 | } | 242 | } |
243 | 243 | ||
244 | int acpi_processor_suspend(struct acpi_device * device) | 244 | int acpi_processor_suspend(struct device *dev) |
245 | { | 245 | { |
246 | if (acpi_idle_suspend == 1) | 246 | if (acpi_idle_suspend == 1) |
247 | return 0; | 247 | return 0; |
@@ -251,7 +251,7 @@ int acpi_processor_suspend(struct acpi_device * device) | |||
251 | return 0; | 251 | return 0; |
252 | } | 252 | } |
253 | 253 | ||
254 | int acpi_processor_resume(struct acpi_device * device) | 254 | int acpi_processor_resume(struct device *dev) |
255 | { | 255 | { |
256 | if (acpi_idle_suspend == 0) | 256 | if (acpi_idle_suspend == 0) |
257 | return 0; | 257 | return 0; |
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 8a1894a6eba2..ac3bff6fbbb0 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -334,8 +334,8 @@ int acpi_processor_cst_has_changed(struct acpi_processor *pr); | |||
334 | int acpi_processor_hotplug(struct acpi_processor *pr); | 334 | int acpi_processor_hotplug(struct acpi_processor *pr); |
335 | int acpi_processor_power_exit(struct acpi_processor *pr, | 335 | int acpi_processor_power_exit(struct acpi_processor *pr, |
336 | struct acpi_device *device); | 336 | struct acpi_device *device); |
337 | int acpi_processor_suspend(struct acpi_device * device); | 337 | int acpi_processor_suspend(struct device *dev); |
338 | int acpi_processor_resume(struct acpi_device * device); | 338 | int acpi_processor_resume(struct device *dev); |
339 | extern struct cpuidle_driver acpi_idle_driver; | 339 | extern struct cpuidle_driver acpi_idle_driver; |
340 | 340 | ||
341 | /* in processor_thermal.c */ | 341 | /* in processor_thermal.c */ |