diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-03 02:26:33 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-03 02:26:33 -0400 |
commit | c50e86ce7c2961a41f2f7aa6e4fd6c99229ba205 (patch) | |
tree | 4ea36009719bd8fc523239fe1bdccb90f0dce3ae /drivers/acpi/button.c | |
parent | 14d33d384693eb6083396199de516fdef320f7af (diff) | |
parent | 4cbe5a555fa58a79b6ecbb6c531b8bab0650778d (diff) |
Merge tag 'v3.6-rc4'
Merge 3.6-rc4 to get latest OMAP and device tree fixes.
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r-- | drivers/acpi/button.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index d27d072472f9..314a3b84bbc7 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c | |||
@@ -76,19 +76,23 @@ MODULE_DEVICE_TABLE(acpi, button_device_ids); | |||
76 | 76 | ||
77 | static int acpi_button_add(struct acpi_device *device); | 77 | 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 int acpi_button_resume(struct acpi_device *device); | ||
80 | static void acpi_button_notify(struct acpi_device *device, u32 event); | 79 | static void acpi_button_notify(struct acpi_device *device, u32 event); |
81 | 80 | ||
81 | #ifdef CONFIG_PM_SLEEP | ||
82 | static int acpi_button_resume(struct device *dev); | ||
83 | #endif | ||
84 | static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume); | ||
85 | |||
82 | static struct acpi_driver acpi_button_driver = { | 86 | static struct acpi_driver acpi_button_driver = { |
83 | .name = "button", | 87 | .name = "button", |
84 | .class = ACPI_BUTTON_CLASS, | 88 | .class = ACPI_BUTTON_CLASS, |
85 | .ids = button_device_ids, | 89 | .ids = button_device_ids, |
86 | .ops = { | 90 | .ops = { |
87 | .add = acpi_button_add, | 91 | .add = acpi_button_add, |
88 | .resume = acpi_button_resume, | ||
89 | .remove = acpi_button_remove, | 92 | .remove = acpi_button_remove, |
90 | .notify = acpi_button_notify, | 93 | .notify = acpi_button_notify, |
91 | }, | 94 | }, |
95 | .drv.pm = &acpi_button_pm, | ||
92 | }; | 96 | }; |
93 | 97 | ||
94 | struct acpi_button { | 98 | struct acpi_button { |
@@ -308,14 +312,17 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) | |||
308 | } | 312 | } |
309 | } | 313 | } |
310 | 314 | ||
311 | static int acpi_button_resume(struct acpi_device *device) | 315 | #ifdef CONFIG_PM_SLEEP |
316 | static int acpi_button_resume(struct device *dev) | ||
312 | { | 317 | { |
318 | struct acpi_device *device = to_acpi_device(dev); | ||
313 | struct acpi_button *button = acpi_driver_data(device); | 319 | struct acpi_button *button = acpi_driver_data(device); |
314 | 320 | ||
315 | if (button->type == ACPI_BUTTON_TYPE_LID) | 321 | if (button->type == ACPI_BUTTON_TYPE_LID) |
316 | return acpi_lid_send_state(device); | 322 | return acpi_lid_send_state(device); |
317 | return 0; | 323 | return 0; |
318 | } | 324 | } |
325 | #endif | ||
319 | 326 | ||
320 | static int acpi_button_add(struct acpi_device *device) | 327 | static int acpi_button_add(struct acpi_device *device) |
321 | { | 328 | { |