`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 <[email protected]>
---
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