]> err.no Git - linux-2.6/commitdiff
[PATCH] matroxfb: simply return what i2c_add_driver() does
authorArthur Othieno <apgo@patchbomb.org>
Mon, 27 Mar 2006 09:17:24 +0000 (01:17 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 27 Mar 2006 16:44:55 +0000 (08:44 -0800)
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 <apgo@patchbomb.org>
Acked-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Petr Vandrovec <petr@vandrovec.name>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/video/matrox/matroxfb_maven.c

index 6019710dc298513c819c1fc419a24a29d5427118..531a0c3b6ec155ae6b604f13d731c014ac153034 100644 (file)
@@ -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);
 }