Replace the custom driver init and exit functions by module_i2c_driver(). Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> --- drivers/media/video/mt9m032.c | 19 +------------------ 1 files changed, 1 insertions(+), 18 deletions(-) diff --git a/drivers/media/video/mt9m032.c b/drivers/media/video/mt9m032.c index ec8eca9..8f8b8b9 100644 --- a/drivers/media/video/mt9m032.c +++ b/drivers/media/video/mt9m032.c @@ -802,24 +802,7 @@ static struct i2c_driver mt9m032_i2c_driver = { .id_table = mt9m032_id_table, }; -static int __init mt9m032_init(void) -{ - int rval; - - rval = i2c_add_driver(&mt9m032_i2c_driver); - if (rval) - pr_err("%s: failed registering " MT9M032_NAME "\n", __func__); - - return rval; -} - -static void mt9m032_exit(void) -{ - i2c_del_driver(&mt9m032_i2c_driver); -} - -module_init(mt9m032_init); -module_exit(mt9m032_exit); +module_i2c_driver(mt9m032_i2c_driver); MODULE_AUTHOR("Martin Hostettler"); MODULE_DESCRIPTION("MT9M032 camera sensor driver"); -- 1.7.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html