aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/hplance.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2006-03-25 03:07:17 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-25 08:22:53 -0800
commite51c01b08474ea454a965a937fff0407ab6714c7 (patch)
tree403e22aa86b4a24699df7cc1285ab915ec3eda1a /drivers/net/hplance.c
parent[PATCH] reiserfs: use balance_dirty_pages_ratelimited_nr in reiserfs_file_write() (diff)
downloadlinux-dev-e51c01b08474ea454a965a937fff0407ab6714c7.tar.xz
linux-dev-e51c01b08474ea454a965a937fff0407ab6714c7.zip
[PATCH] hp300: fix driver_register() return handling, remove dio_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. dio_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 dio_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: Philip Blundell <philb@gnu.org> Cc: Jochen Friedrich <jochen@scram.de> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Jeff Garzik <jeff@garzik.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/net/hplance.c')
-rw-r--r--drivers/net/hplance.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/hplance.c b/drivers/net/hplance.c
index d8410634bcaf..685693464605 100644
--- a/drivers/net/hplance.c
+++ b/drivers/net/hplance.c
@@ -217,7 +217,7 @@ static int hplance_close(struct net_device *dev)
int __init hplance_init_module(void)
{
- return dio_module_init(&hplance_driver);
+ return dio_register_driver(&hplance_driver);
}
void __exit hplance_cleanup_module(void)