aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpacpi
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2007-07-25 01:36:31 -0400
committerLen Brown <len.brown@intel.com>2007-07-25 01:36:31 -0400
commitcb3e0c107bebc6cf3e7158f7aa54c32017c7d4c4 (patch)
tree2c52ac06cce163bf467d259119b824eed96f2eca /drivers/pnp/pnpacpi
parent1e1f3f24cdbc53e67acd7b2e37e6cf0cb11bd13c (diff)
parent50ad147aa09c829cd452fae6ca99396c0b5b0695 (diff)
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.c14
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)
119 return ACPI_FAILURE(status) ? -ENODEV : 0; 119 return ACPI_FAILURE(status) ? -ENODEV : 0;
120} 120}
121 121
122static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state)
123{
124 return acpi_bus_set_power((acpi_handle)dev->data,
125 acpi_pm_device_sleep_state(&dev->dev,
126 device_may_wakeup(&dev->dev), NULL));
127}
128
129static int pnpacpi_resume(struct pnp_dev *dev)
130{
131 return acpi_bus_set_power((acpi_handle)dev->data, ACPI_STATE_D0);
132}
133
122static struct pnp_protocol pnpacpi_protocol = { 134static struct pnp_protocol pnpacpi_protocol = {
123 .name = "Plug and Play ACPI", 135 .name = "Plug and Play ACPI",
124 .get = pnpacpi_get_resources, 136 .get = pnpacpi_get_resources,
125 .set = pnpacpi_set_resources, 137 .set = pnpacpi_set_resources,
126 .disable = pnpacpi_disable_resources, 138 .disable = pnpacpi_disable_resources,
139 .suspend = pnpacpi_suspend,
140 .resume = pnpacpi_resume,
127}; 141};
128 142
129static int __init pnpacpi_add_device(struct acpi_device *device) 143static int __init pnpacpi_add_device(struct acpi_device *device)