summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-25 03:07:20 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 08:22:53 -0800
commit33d8675ea66e79d21da3ed64ce88dfb2a18bc6a7 (patch)
tree7283a680e122e4d15f50e818bab188b84fc852a9 /drivers/net
parentc2f6fabb2ed3b869bc254c6cdc73d6beaaaf700f (diff)
downloadlinux-33d8675ea66e79d21da3ed64ce88dfb2a18bc6a7.tar.bz2
[PATCH] amiga: fix driver_register() return handling, remove zorro_module_init()
Remove the assumption that driver_register() returns the number of devices bound to the driver. In fact, it returns zero for success or a negative error value. zorro_module_init() used the device count to automatically unregister and unload drivers that found no devices. That might have worked at one time, but has been broken for some time because zorro_register_driver() returned either a negative error or a positive count (never zero). So it could only unregister on failure, when it's not needed anyway. This functionality could be resurrected in individual drivers by counting devices in their .probe() methods. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/a2065.c2
-rw-r--r--drivers/net/ariadne.c2
-rw-r--r--drivers/net/hydra.c2
-rw-r--r--drivers/net/zorro8390.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/a2065.c b/drivers/net/a2065.c
index 8e538a6d7d97..79bb56b8dcef 100644
--- a/drivers/net/a2065.c
+++ b/drivers/net/a2065.c
@@ -829,7 +829,7 @@ static void __devexit a2065_remove_one(struct zorro_dev *z)
static int __init a2065_init_module(void)
{
- return zorro_module_init(&a2065_driver);
+ return zorro_register_driver(&a2065_driver);
}
static void __exit a2065_cleanup_module(void)
diff --git a/drivers/net/ariadne.c b/drivers/net/ariadne.c
index 9fe93acfc8ef..d1b6b1f794e2 100644
--- a/drivers/net/ariadne.c
+++ b/drivers/net/ariadne.c
@@ -864,7 +864,7 @@ static void __devexit ariadne_remove_one(struct zorro_dev *z)
static int __init ariadne_init_module(void)
{
- return zorro_module_init(&ariadne_driver);
+ return zorro_register_driver(&ariadne_driver);
}
static void __exit ariadne_cleanup_module(void)
diff --git a/drivers/net/hydra.c b/drivers/net/hydra.c
index 6e0ca7340a8f..d9fb8e74e631 100644
--- a/drivers/net/hydra.c
+++ b/drivers/net/hydra.c
@@ -242,7 +242,7 @@ static void __devexit hydra_remove_one(struct zorro_dev *z)
static int __init hydra_init_module(void)
{
- return zorro_module_init(&hydra_driver);
+ return zorro_register_driver(&hydra_driver);
}
static void __exit hydra_cleanup_module(void)
diff --git a/drivers/net/zorro8390.c b/drivers/net/zorro8390.c
index 761021603597..8037e5806d0a 100644
--- a/drivers/net/zorro8390.c
+++ b/drivers/net/zorro8390.c
@@ -426,7 +426,7 @@ static void __devexit zorro8390_remove_one(struct zorro_dev *z)
static int __init zorro8390_init_module(void)
{
- return zorro_module_init(&zorro8390_driver);
+ return zorro_register_driver(&zorro8390_driver);
}
static void __exit zorro8390_cleanup_module(void)