diff options
author | Takashi Iwai <tiwai@suse.de> | 2011-03-28 13:03:58 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-28 13:03:58 +0200 |
commit | cdccfc8dc0bf62a1da327324a8d639139acc9279 (patch) | |
tree | dca7934b27d510c9c006558979ebc48e07a531cf /drivers/pci/pci-acpi.c | |
parent | b21a8ee67013372f439fbd1591e91d09de49bb9c (diff) | |
parent | c6b358748e19ce7e230b0926ac42696bc485a562 (diff) |
Merge branch 'fix/misc' into topic/misc
Diffstat (limited to 'drivers/pci/pci-acpi.c')
-rw-r--r-- | drivers/pci/pci-acpi.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c index 6fe0772e0e7..7c3b18e78ce 100644 --- a/drivers/pci/pci-acpi.c +++ b/drivers/pci/pci-acpi.c @@ -293,19 +293,11 @@ static int acpi_dev_run_wake(struct device *phys_dev, bool enable) } if (enable) { - if (!dev->wakeup.run_wake_count++) { - acpi_enable_wakeup_device_power(dev, ACPI_STATE_S0); - acpi_enable_gpe(dev->wakeup.gpe_device, - dev->wakeup.gpe_number); - } - } else if (dev->wakeup.run_wake_count > 0) { - if (!--dev->wakeup.run_wake_count) { - acpi_disable_gpe(dev->wakeup.gpe_device, - dev->wakeup.gpe_number); - acpi_disable_wakeup_device_power(dev); - } + acpi_enable_wakeup_device_power(dev, ACPI_STATE_S0); + acpi_enable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number); } else { - error = -EALREADY; + acpi_disable_gpe(dev->wakeup.gpe_device, dev->wakeup.gpe_number); + acpi_disable_wakeup_device_power(dev); } return error; |