diff options
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 0bc889144e6f..fcd32ac575c3 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c | |||
@@ -124,11 +124,25 @@ static int pnpacpi_disable_resources(struct pnp_dev *dev) | |||
124 | return ACPI_FAILURE(status) ? -ENODEV : 0; | 124 | return ACPI_FAILURE(status) ? -ENODEV : 0; |
125 | } | 125 | } |
126 | 126 | ||
127 | static int pnpacpi_suspend(struct pnp_dev *dev, pm_message_t state) | ||
128 | { | ||
129 | return acpi_bus_set_power((acpi_handle)dev->data, | ||
130 | acpi_pm_device_sleep_state(&dev->dev, | ||
131 | device_may_wakeup(&dev->dev), NULL)); | ||
132 | } | ||
133 | |||
134 | static int pnpacpi_resume(struct pnp_dev *dev) | ||
135 | { | ||
136 | return acpi_bus_set_power((acpi_handle)dev->data, ACPI_STATE_D0); | ||
137 | } | ||
138 | |||
127 | static struct pnp_protocol pnpacpi_protocol = { | 139 | static struct pnp_protocol pnpacpi_protocol = { |
128 | .name = "Plug and Play ACPI", | 140 | .name = "Plug and Play ACPI", |
129 | .get = pnpacpi_get_resources, | 141 | .get = pnpacpi_get_resources, |
130 | .set = pnpacpi_set_resources, | 142 | .set = pnpacpi_set_resources, |
131 | .disable = pnpacpi_disable_resources, | 143 | .disable = pnpacpi_disable_resources, |
144 | .suspend = pnpacpi_suspend, | ||
145 | .resume = pnpacpi_resume, | ||
132 | }; | 146 | }; |
133 | 147 | ||
134 | static int __init pnpacpi_add_device(struct acpi_device *device) | 148 | static int __init pnpacpi_add_device(struct acpi_device *device) |