Commit d56a3e38 authored by Bjorn Helgaas's avatar Bjorn Helgaas Committed by Paul Mackerras
Browse files

[PATCH] 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.
Signed-off-by: default avatarBjorn Helgaas <>
Cc: Benjamin Herrenschmidt <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarPaul Mackerras <>
parent 6ea671a1
......@@ -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-> = 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);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment