Skip to contentSkip to conversation

macintosh: tidy-up driver_register() return values

PATCH New Bjorn Helgaas 1 participant 1 message Mar 2, 2006 Linux for power macintosh

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 macintosh: tidy-up driver_register() return values

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.

drivers/macintosh/macio_asic.c +1 -4
Index: work-mm4/drivers/macintosh/macio_asic.c
===================================================================
@@ -550,15 +550,12 @@
  */
 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);
 }
 
 /**