diff options
author | Bjorn Helgaas <bjorn.helgaas@hp.com> | 2006-03-21 23:20:27 -0800 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-03-23 14:40:54 +1100 |
commit | 6ea671a12f66b9d4d0f35fce957a71a6849295f2 (patch) | |
tree | 771e6b38ad68eae3d113db716fc9f3a2d217c780 /arch | |
parent | 57ae595f6bf8bde42de199ff9fe68b873080fde2 (diff) | |
download | linux-3.10-6ea671a12f66b9d4d0f35fce957a71a6849295f2.tar.gz linux-3.10-6ea671a12f66b9d4d0f35fce957a71a6849295f2.tar.bz2 linux-3.10-6ea671a12f66b9d4d0f35fce957a71a6849295f2.zip |
[PATCH] powerpc: tidy-up of_register_driver()/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.
Nobody uses the return value of of_register_driver() anyway.
Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/of_device.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c index 22d83d4d1af..9feeeef5a87 100644 --- a/arch/powerpc/kernel/of_device.c +++ b/arch/powerpc/kernel/of_device.c @@ -147,15 +147,12 @@ postcore_initcall(of_bus_driver_init); int of_register_driver(struct of_platform_driver *drv) { - int count = 0; - /* initialize common driver fields */ drv->driver.name = drv->name; drv->driver.bus = &of_platform_bus_type; /* register with core */ - count = driver_register(&drv->driver); - return count ? count : 1; + return driver_register(&drv->driver); } void of_unregister_driver(struct of_platform_driver *drv) |