[PATCH] macintosh: tidy-up driver_register() return values
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Wed, 22 Mar 2006 07:20:28 +0000 (23:20 -0800)
committerPaul Mackerras <paulus@samba.org>
Thu, 23 Mar 2006 03:41:04 +0000 (14:41 +1100)
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.

All callers of macio_register_driver() either ignore the return value or
return it as the return value of a module_init() function.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
drivers/macintosh/macio_asic.c

index 69596f6..431bd37 100644 (file)
@@ -550,15 +550,12 @@ static void macio_pci_add_devices(struct macio_chip *chip)
  */
 int macio_register_driver(struct macio_driver *drv)
 {
-       int count = 0;
-
        /* initialize common driver fields */
        drv->driver.name = drv->name;
        drv->driver.bus = &macio_bus_type;
 
        /* register with core */
-       count = driver_register(&drv->driver);
-       return count ? count : 1;
+       return driver_register(&drv->driver);
 }
 
 /**