diff options
Diffstat (limited to 'drivers/zorro/zorro-driver.c')
-rw-r--r-- | drivers/zorro/zorro-driver.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c index 067c07be928c..e6c4390d8bd6 100644 --- a/drivers/zorro/zorro-driver.c +++ b/drivers/zorro/zorro-driver.c | |||
@@ -60,6 +60,20 @@ static int zorro_device_probe(struct device *dev) | |||
60 | } | 60 | } |
61 | 61 | ||
62 | 62 | ||
63 | static int zorro_device_remove(struct device *dev) | ||
64 | { | ||
65 | struct zorro_dev *z = to_zorro_dev(dev); | ||
66 | struct zorro_driver *drv = to_zorro_driver(dev->driver); | ||
67 | |||
68 | if (drv) { | ||
69 | if (drv->remove) | ||
70 | drv->remove(z); | ||
71 | z->driver = NULL; | ||
72 | } | ||
73 | return 0; | ||
74 | } | ||
75 | |||
76 | |||
63 | /** | 77 | /** |
64 | * zorro_register_driver - register a new Zorro driver | 78 | * zorro_register_driver - register a new Zorro driver |
65 | * @drv: the driver structure to register | 79 | * @drv: the driver structure to register |
@@ -128,6 +142,7 @@ struct bus_type zorro_bus_type = { | |||
128 | .name = "zorro", | 142 | .name = "zorro", |
129 | .match = zorro_bus_match, | 143 | .match = zorro_bus_match, |
130 | .probe = zorro_device_probe, | 144 | .probe = zorro_device_probe, |
145 | .remove = zorro_device_remove, | ||
131 | }; | 146 | }; |
132 | 147 | ||
133 | 148 | ||