From 6819f3644fa2800dfedc88a2e48e054ece892d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20H=C3=A4rdeman?= Date: Mon, 21 Sep 2009 17:04:52 -0700 Subject: [PATCH] --- yaml --- r: 164545 b: refs/heads/master c: abd6633c67925f90775bb74755f9c547e30f1f20 h: refs/heads/master i: 164543: 63174e4954f5b11ace506389b3962b51a3264540 v: v3 --- [refs] | 2 +- trunk/drivers/pnp/driver.c | 10 ++++++++++ trunk/include/linux/pnp.h | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 242eb441f916..bbfbc2f89a77 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a976f150a6953da5ccbd40fa6dba3bd7d56f9f67 +refs/heads/master: abd6633c67925f90775bb74755f9c547e30f1f20 diff --git a/trunk/drivers/pnp/driver.c b/trunk/drivers/pnp/driver.c index 527ee764c93f..cd11b113494f 100644 --- a/trunk/drivers/pnp/driver.c +++ b/trunk/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, diff --git a/trunk/include/linux/pnp.h b/trunk/include/linux/pnp.h index b063c7328ba5..fddfafaed024 100644 --- a/trunk/include/linux/pnp.h +++ b/trunk/include/linux/pnp.h @@ -360,6 +360,7 @@ struct pnp_driver { unsigned int flags; int (*probe) (struct pnp_dev *dev, const struct pnp_device_id *dev_id); void (*remove) (struct pnp_dev *dev); + void (*shutdown) (struct pnp_dev *dev); int (*suspend) (struct pnp_dev *dev, pm_message_t state); int (*resume) (struct pnp_dev *dev); struct device_driver driver;