Skip to content

Commit

Permalink
[PATCH] matroxfb: simply return what i2c_add_driver() does
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Jean Delvare <[email protected]>
Acked-by: Petr Vandrovec <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Arthur Othieno authored and Linus Torvalds committed Mar 27, 2006
1 parent fc4effc commit 756e21a
Showing 1 changed file with 5 additions and 12 deletions.
17 changes: 5 additions & 12 deletions drivers/video/matrox/matroxfb_maven.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 756e21a

Please sign in to comment.