summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/driver.c
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2007-07-20 04:03:20 +0200
committerLen Brown <len.brown@intel.com>2007-07-22 10:18:20 +0200
commitfc30e68e88baf463683bde43347756889ba2ffae (patch)
tree3da69f1c11c10e0ad3c3663989575a5a03ef61c1 /drivers/pnp/driver.c
parentACPI: Add acpi_pm_device_sleep_state helper routine (diff)
downloadlinux-fc30e68e88baf463683bde43347756889ba2ffae.tar.xz
linux-fc30e68e88baf463683bde43347756889ba2ffae.zip
ACPI, PNP: hook ACPI D-state to PNP suspend/resume
applied after Rafel's 'PM: Update global suspend and hibernation operations framework' patch set Signed-off-by: Shaohua Li <shaohua.li@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/pnp/driver.c')
-rw-r--r--drivers/pnp/driver.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index e161423b4300..1432806451cd 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -167,6 +167,8 @@ static int pnp_bus_suspend(struct device *dev, pm_message_t state)
return error;
}
+ if (pnp_dev->protocol && pnp_dev->protocol->suspend)
+ pnp_dev->protocol->suspend(pnp_dev, state);
return 0;
}
@@ -179,6 +181,9 @@ static int pnp_bus_resume(struct device *dev)
if (!pnp_drv)
return 0;
+ if (pnp_dev->protocol && pnp_dev->protocol->resume)
+ pnp_dev->protocol->resume(pnp_dev);
+
if (!(pnp_drv->flags & PNP_DRIVER_RES_DO_NOT_CHANGE)) {
error = pnp_start_dev(pnp_dev);
if (error)