From: Arthur Othieno Date: Mon, 27 Mar 2006 09:17:24 +0000 (-0800) Subject: [PATCH] matroxfb: simply return what i2c_add_driver() does X-Git-Tag: v2.6.17-rc1~333 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=756e21a022aba5214bafcf803f114aed8a783b99;p=linux-2.6 [PATCH] matroxfb: simply return what i2c_add_driver() does 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 what i2c_add_driver() did, instead of storing it. Add __init/__exit annotations while we're at it. Signed-off-by: Arthur Othieno Acked-by: Jean Delvare Acked-by: Petr Vandrovec Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/video/matrox/matroxfb_maven.c b/drivers/video/matrox/matroxfb_maven.c index 6019710dc2..531a0c3b6e 100644 --- a/drivers/video/matrox/matroxfb_maven.c +++ b/drivers/video/matrox/matroxfb_maven.c @@ -1297,20 +1297,13 @@ static struct i2c_driver maven_driver={ .detach_client = maven_detach_client, }; -/* ************************** */ - -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); }