summaryrefslogtreecommitdiffstats
path: root/drivers/pnp/driver.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2009-09-21 17:04:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-22 07:17:49 -0700
commitabd6633c67925f90775bb74755f9c547e30f1f20 (patch)
tree9cb974febc1a30e3914720655cd406cea84c063e /drivers/pnp/driver.c
parenta976f150a6953da5ccbd40fa6dba3bd7d56f9f67 (diff)
downloadop-kernel-dev-abd6633c67925f90775bb74755f9c547e30f1f20.zip
op-kernel-dev-abd6633c67925f90775bb74755f9c547e30f1f20.tar.gz
pnp: add a shutdown method to pnp drivers
The shutdown method is used by the winbond cir driver to setup the hardware for wake-from-S5. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: David Härdeman <david@hardeman.nu> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pnp/driver.c')
-rw-r--r--drivers/pnp/driver.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
index 527ee76..cd11b11 100644
--- a/drivers/pnp/driver.c
+++ b/drivers/pnp/driver.c
@@ -135,6 +135,15 @@ static int pnp_device_remove(struct device *dev)
return 0;
}
+static void pnp_device_shutdown(struct device *dev)
+{
+ struct pnp_dev *pnp_dev = to_pnp_dev(dev);
+ struct pnp_driver *drv = pnp_dev->driver;
+
+ if (drv && drv->shutdown)
+ drv->shutdown(pnp_dev);
+}
+
static int pnp_bus_match(struct device *dev, struct device_driver *drv)
{
struct pnp_dev *pnp_dev = to_pnp_dev(dev);
@@ -203,6 +212,7 @@ struct bus_type pnp_bus_type = {
.match = pnp_bus_match,
.probe = pnp_device_probe,
.remove = pnp_device_remove,
+ .shutdown = pnp_device_shutdown,
.suspend = pnp_bus_suspend,
.resume = pnp_bus_resume,
.dev_attrs = pnp_interface_attrs,
OpenPOWER on IntegriCloud