* [PATCH] macintosh: tidy-up driver_register() return values
@ 2006-03-02 23:18 Bjorn Helgaas
0 siblings, 0 replies; only message in thread
From: Bjorn Helgaas @ 2006-03-02 23:18 UTC (permalink / raw)
To: Paul Mackerras, Benjamin Herrenschmidt; +Cc: Andrew Morton, linuxppc-dev
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>
Index: work-mm4/drivers/macintosh/macio_asic.c
===================================================================
--- work-mm4.orig/drivers/macintosh/macio_asic.c 2006-03-01 15:37:15.000000000 -0700
+++ work-mm4/drivers/macintosh/macio_asic.c 2006-03-02 12:57:05.000000000 -0700
@@ -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);
}
/**
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-03-02 23:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-02 23:18 [PATCH] macintosh: tidy-up driver_register() return values Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox