diff options
author | Len Brown <len.brown@intel.com> | 2011-01-12 04:55:46 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-01-12 04:55:46 -0500 |
commit | fb4af417cce9ff87abf33a6bb9a0cf613e285364 (patch) | |
tree | 328ce710c6e6acf7b58145da939fb3cc91d188c9 /drivers/acpi/button.c | |
parent | 07bf280521bb06bc8e64f0b998fc391253fcb959 (diff) | |
parent | 7b330707dddab1ad772898c1c82516342a551173 (diff) |
Merge branch 'wakeup-etc-rafael' into release
Diffstat (limited to 'drivers/acpi/button.c')
-rw-r--r-- | drivers/acpi/button.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c index 71ef9cd0735..76bbb78a5ad 100644 --- a/drivers/acpi/button.c +++ b/drivers/acpi/button.c @@ -279,6 +279,9 @@ static int acpi_lid_send_state(struct acpi_device *device) input_report_switch(button->input, SW_LID, !state); input_sync(button->input); + if (state) + pm_wakeup_event(&device->dev, 0); + ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, device); if (ret == NOTIFY_DONE) ret = blocking_notifier_call_chain(&acpi_lid_notifier, state, @@ -314,6 +317,8 @@ static void acpi_button_notify(struct acpi_device *device, u32 event) input_sync(input); input_report_key(input, keycode, 0); input_sync(input); + + pm_wakeup_event(&device->dev, 0); } acpi_bus_generate_proc_event(device, event, ++button->pushed); @@ -426,7 +431,7 @@ static int acpi_button_add(struct acpi_device *device) acpi_enable_gpe(device->wakeup.gpe_device, device->wakeup.gpe_number); device->wakeup.run_wake_count++; - device->wakeup.state.enabled = 1; + device_set_wakeup_enable(&device->dev, true); } printk(KERN_INFO PREFIX "%s [%s]\n", name, acpi_device_bid(device)); @@ -449,7 +454,7 @@ static int acpi_button_remove(struct acpi_device *device, int type) acpi_disable_gpe(device->wakeup.gpe_device, device->wakeup.gpe_number); device->wakeup.run_wake_count--; - device->wakeup.state.enabled = 0; + device_set_wakeup_enable(&device->dev, false); } acpi_button_remove_fs(device); |