From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Paul Mackerras <paulus@samba.org>,
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Andrew Morton <akpm@osdl.org>, linuxppc-dev@ozlabs.org
Subject: [PATCH] macintosh: tidy-up driver_register() return values
Date: Thu, 2 Mar 2006 16:18:51 -0700 [thread overview]
Message-ID: <200603021618.51590.bjorn.helgaas@hp.com> (raw)
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);
}
/**
reply other threads:[~2006-03-02 23:38 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200603021618.51590.bjorn.helgaas@hp.com \
--to=bjorn.helgaas@hp.com \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=paulus@samba.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox