mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Signed-off-by: David Härdeman <[email protected]> Cc: Dmitry Torokhov <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
a976f150a6
commit
abd6633c67
2 changed files with 11 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue