All of lore.kernel.org
 help / color / mirror / Atom feed
From: a.othieno@bluewin.ch (Arthur Othieno)
To: akpm@osdl.org
Cc: vandrove@vc.cvut.cz, linux-kernel@vger.kernel.org
Subject: [PATCH] matroxfb: simply return what i2c_add_driver() does
Date: Mon, 19 Dec 2005 22:25:31 -0500	[thread overview]
Message-ID: <20051220032531.GC24700@krypton> (raw)

`insmod' will tell us when the module failed to load. We do no further
processing on the return from i2c_add_driver(), so just return that
instead of storing it.

Add __init/__exit annotations while we're at it.

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>

---

 drivers/video/matrox/matroxfb_maven.c |   17 +++++------------
 1 files changed, 5 insertions(+), 12 deletions(-)

5599955f4f42ebfd5b244563f2be24f9e60fe186
diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c
index ad60bbb..d5275c7 100644
--- a/drivers/video/matrox/matroxfb_maven.c
+++ b/drivers/video/matrox/matroxfb_maven.c
@@ -1302,20 +1302,13 @@ static struct i2c_driver maven_driver={
 	.command	= maven_command,
 };
 
-/* ************************** */
-
-static int matroxfb_maven_init(void) {
-	int err;
-
-	err = i2c_add_driver(&maven_driver);
-	if (err) {
-		printk(KERN_ERR "maven: Maven driver failed to register (%d).\n", err);
-		return err;
-	}
-	return 0;
+static int __init matroxfb_maven_init(void)
+{
+	return i2c_add_driver(&maven_driver);
 }
 
-static void matroxfb_maven_exit(void) {
+static void __exit matroxfb_maven_exit(void)
+{
 	i2c_del_driver(&maven_driver);
 }
 
-- 
0.99.9n

             reply	other threads:[~2005-12-20  3:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-20  3:25 Arthur Othieno [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-02-11 11:00 [PATCH] matroxfb: simply return what i2c_add_driver() does Arthur Othieno
2006-02-11 13:53 ` Jean Delvare
2006-02-11 14:39   ` Arthur Othieno

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=20051220032531.GC24700@krypton \
    --to=a.othieno@bluewin.ch \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vandrove@vc.cvut.cz \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.