diff options
author | Len Brown <len.brown@intel.com> | 2007-07-25 07:36:31 +0200 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-07-25 07:36:31 +0200 |
commit | cb3e0c107bebc6cf3e7158f7aa54c32017c7d4c4 (patch) | |
tree | 2c52ac06cce163bf467d259119b824eed96f2eca /drivers/pnp/pnpacpi | |
parent | Pull kconfig into release branch (diff) | |
parent | ACPI: Remove references to ACPI_STATE_S2 from acpi_pm_enter (diff) | |
download | linux-cb3e0c107bebc6cf3e7158f7aa54c32017c7d4c4.tar.xz linux-cb3e0c107bebc6cf3e7158f7aa54c32017c7d4c4.zip |
Pull d-states into release branch
Conflicts:
drivers/acpi/sleep/main.c
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/pnpacpi')
-rw-r--r-- | drivers/pnp/pnpacpi/core.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index a00548799e98..c37a558ecd96 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -119,11 +119,25 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev) return ACPI_FAILURE(status) ? -ENODEV : 0; } +static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state) +{ + return acpi_bus_set_power((acpi_handle)dev->data, + acpi_pm_device_sleep_state(&dev->dev, + device_may_wakeup(&dev->dev), NULL)); +} + +static int pnpacpi_resume(struct pnp_dev *dev) +{ + return acpi_bus_set_power((acpi_handle)dev->data, ACPI_STATE_D0); +} + static struct pnp_protocol pnpacpi_protocol = { .name = "Plug and Play ACPI", .get = pnpacpi_get_resources, .set = pnpacpi_set_resources, .disable = pnpacpi_disable_resources, + .suspend = pnpacpi_suspend, + .resume = pnpacpi_resume, }; static int __init pnpacpi_add_device(struct acpi_device *device) |