matroxfb: simply return what i2c_add_driver() does
PATCH 1/1 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 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
drivers/video/matrox/matroxfb_maven.c +5 -12
@@ -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); }
Signature · 1 line
0.99.9n