Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 164545
b: refs/heads/master
c: abd6633
h: refs/heads/master
i:
  164543: 63174e4
v: v3
  • Loading branch information
David Härdeman authored and Linus Torvalds committed Sep 22, 2009
1 parent 974539f commit 6819f36
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a976f150a6953da5ccbd40fa6dba3bd7d56f9f67
refs/heads/master: abd6633c67925f90775bb74755f9c547e30f1f20
10 changes: 10 additions & 0 deletions trunk/drivers/pnp/driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/pnp.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 6819f36

Please sign in to comment.