提交 756e21a0 编写于 作者: A Arthur Othieno 提交者: Linus Torvalds

[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: NArthur Othieno <apgo@patchbomb.org>
Acked-by: NJean Delvare <khali@linux-fr.org>
Acked-by: NPetr Vandrovec <petr@vandrovec.name>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 fc4effc7
......@@ -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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册