diff options
author | Vaishali Thakkar <vthakkar1994@gmail.com> | 2015-03-18 12:30:44 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-18 10:46:08 +0100 |
commit | 4c205ab53489894c77f81fe9a0c0ff6345b83e76 (patch) | |
tree | 6a49e506d8f071c904a4a497cb3d2bb55d8870fd /drivers/staging/media | |
parent | 70837c1292c7a04c8fd0b940be70775b79536d50 (diff) | |
download | op-kernel-dev-4c205ab53489894c77f81fe9a0c0ff6345b83e76.zip op-kernel-dev-4c205ab53489894c77f81fe9a0c0ff6345b83e76.tar.gz |
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>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r-- | drivers/staging/media/bcm2048/radio-bcm2048.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c b/drivers/staging/media/bcm2048/radio-bcm2048.c index 25ab2e0..f28ffef 100644 --- a/drivers/staging/media/bcm2048/radio-bcm2048.c +++ b/drivers/staging/media/bcm2048/radio-bcm2048.c @@ -2717,22 +2717,7 @@ static struct i2c_driver bcm2048_i2c_driver = { .id_table = bcm2048_id, }; -/* - * 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_i2c_driver(bcm2048_i2c_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR(BCM2048_DRIVER_AUTHOR); |