aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/zorro/zorro-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/zorro/zorro-driver.c')
-rw-r--r--drivers/zorro/zorro-driver.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/drivers/zorro/zorro-driver.c b/drivers/zorro/zorro-driver.c
index 0dd7cbcec2b0..96f068830549 100644
--- a/drivers/zorro/zorro-driver.c
+++ b/drivers/zorro/zorro-driver.c
@@ -47,32 +47,26 @@ static int zorro_device_probe(struct device *dev)
struct zorro_driver *drv = to_zorro_driver(dev->driver);
struct zorro_dev *z = to_zorro_dev(dev);
- if (!z->driver && drv->probe) {
+ if (drv->probe) {
const struct zorro_device_id *id;
id = zorro_match_device(drv->id_table, z);
if (id)
error = drv->probe(z, id);
- if (error >= 0) {
- z->driver = drv;
+ if (error >= 0)
error = 0;
- }
}
return error;
}
-static int zorro_device_remove(struct device *dev)
+static void zorro_device_remove(struct device *dev)
{
struct zorro_dev *z = to_zorro_dev(dev);
struct zorro_driver *drv = to_zorro_driver(dev->driver);
- if (drv) {
- if (drv->remove)
- drv->remove(z);
- z->driver = NULL;
- }
- return 0;
+ if (drv->remove)
+ drv->remove(z);
}