提交 d56a3e38 编写于 作者: B Bjorn Helgaas 提交者: Paul Mackerras

[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: NBjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NPaul Mackerras <paulus@samba.org>
上级 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->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);
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册