Staging: media: Use module_i2c_driver
Macro module_i2c_driver is used for drivers whose init and exit paths does only register and unregister to i2c API. So, here remove some boilerplate code by using module_i2c_driver. Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
70837c1292
commit
4c205ab534
@ -2717,22 +2717,7 @@ static struct i2c_driver bcm2048_i2c_driver = {
|
|||||||
.id_table = bcm2048_id,
|
.id_table = bcm2048_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
module_i2c_driver(bcm2048_i2c_driver);
|
||||||
* Module Interface
|
|
||||||
*/
|
|
||||||
static int __init bcm2048_module_init(void)
|
|
||||||
{
|
|
||||||
pr_info(BCM2048_DRIVER_DESC "\n");
|
|
||||||
|
|
||||||
return i2c_add_driver(&bcm2048_i2c_driver);
|
|
||||||
}
|
|
||||||
module_init(bcm2048_module_init);
|
|
||||||
|
|
||||||
static void __exit bcm2048_module_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&bcm2048_i2c_driver);
|
|
||||||
}
|
|
||||||
module_exit(bcm2048_module_exit);
|
|
||||||
|
|
||||||
MODULE_LICENSE("GPL");
|
MODULE_LICENSE("GPL");
|
||||||
MODULE_AUTHOR(BCM2048_DRIVER_AUTHOR);
|
MODULE_AUTHOR(BCM2048_DRIVER_AUTHOR);
|
||||||
|
Loading…
Reference in New Issue
Block a user