Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11641
b: refs/heads/master
c: 3406010
h: refs/heads/master
i:
  11639: 2c8bb51
v: v3
  • Loading branch information
Stephen Rothwell committed Oct 24, 2005
1 parent 0debd07 commit 7dafca9
Show file tree
Hide file tree
Showing 3 changed files with 13 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: 915124d8114ec8c3825b10a39151bf9e851593bb
refs/heads/master: 340601043df518d6f4f82da285c60c785ac8a716
11 changes: 11 additions & 0 deletions trunk/arch/powerpc/kernel/vio.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,16 @@ static int vio_bus_remove(struct device *dev)
return 1;
}

/* convert from struct device to struct vio_dev and pass to driver. */
static void vio_bus_shutdown(struct device *dev)
{
struct vio_dev *viodev = to_vio_dev(dev);
struct vio_driver *viodrv = to_vio_driver(dev->driver);

if (viodrv->shutdown)
viodrv->shutdown(viodev);
}

/**
* vio_register_driver: - Register a new vio driver
* @drv: The vio_driver structure to be registered.
Expand All @@ -82,6 +92,7 @@ int vio_register_driver(struct vio_driver *viodrv)
viodrv->driver.bus = &vio_bus_type;
viodrv->driver.probe = vio_bus_probe;
viodrv->driver.remove = vio_bus_remove;
viodrv->driver.shutdown = vio_bus_shutdown;

return driver_register(&viodrv->driver);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/asm-powerpc/vio.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct vio_driver {
const struct vio_device_id *id_table;
int (*probe)(struct vio_dev *dev, const struct vio_device_id *id);
int (*remove)(struct vio_dev *dev);
void (*shutdown)(struct vio_dev *dev);
unsigned long driver_data;
struct device_driver driver;
};
Expand Down

0 comments on commit 7dafca9

Please sign in to comment.