Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2f9b0b5e46f0381fd41af8cb9ed4daffee59d4f3
Commit:     2f9b0b5e46f0381fd41af8cb9ed4daffee59d4f3
Parent:     9e893bb8530d9c09b1eb8da8734eebf4182bb8b7
Author:     Geert Uytterhoeven <[EMAIL PROTECTED]>
AuthorDate: Sun Nov 18 11:10:04 2007 +0100
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Mon Nov 26 19:15:31 2007 -0800

    Amiga zorro bus: Add missing zorro_device_remove()
    
    Amiga zorro bus: Add missing zorro_device_remove(). Without this ifconfig 
and
    /proc/net/dev oops after unloading a Zorro network device driver module.
    
    Signed-off-by: Geert Uytterhoeven <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 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 067c07b..e6c4390 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)
 }
 
 
+static int 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;
+}
+
+
     /**
      *  zorro_register_driver - register a new Zorro driver
      *  @drv: the driver structure to register
@@ -128,6 +142,7 @@ struct bus_type zorro_bus_type = {
        .name   = "zorro",
        .match  = zorro_bus_match,
        .probe  = zorro_device_probe,
+       .remove = zorro_device_remove,
 };
 
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to