diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2006-03-25 03:07:20 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-25 08:22:53 -0800 |
commit | 33d8675ea66e79d21da3ed64ce88dfb2a18bc6a7 (patch) | |
tree | 7283a680e122e4d15f50e818bab188b84fc852a9 /drivers/video/cirrusfb.c | |
parent | c2f6fabb2ed3b869bc254c6cdc73d6beaaaf700f (diff) |
[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/video/cirrusfb.c')
-rw-r--r-- | drivers/video/cirrusfb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/cirrusfb.c b/drivers/video/cirrusfb.c index e0dbdfc0c8b..66d6f2f0a21 100644 --- a/drivers/video/cirrusfb.c +++ b/drivers/video/cirrusfb.c @@ -2622,7 +2622,7 @@ static int __init cirrusfb_init(void) #endif #ifdef CONFIG_ZORRO - error |= zorro_module_init(&cirrusfb_zorro_driver); + error |= zorro_register_driver(&cirrusfb_zorro_driver); #endif #ifdef CONFIG_PCI error |= pci_register_driver(&cirrusfb_pci_driver); |