[PATCH] matroxfb: simply return what i2c_add_driver() does

From: Arthur Othieno
Date: Mon Dec 19 2005 - 22:25:21 EST


`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@xxxxxxxxxx>

---

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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/