Skip to content

Commit

Permalink
USB: misc: usb3503: use module_i2c_driver to simplify the code
Browse files Browse the repository at this point in the history
Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Wei Yongjun authored and Greg Kroah-Hartman committed Mar 15, 2013
1 parent 07cd29d commit 8244ac0
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/usb/misc/usb3503.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,18 +307,7 @@ static struct i2c_driver usb3503_driver = {
.id_table = usb3503_id,
};

static int __init usb3503_init(void)
{
return i2c_add_driver(&usb3503_driver);
}

static void __exit usb3503_exit(void)
{
i2c_del_driver(&usb3503_driver);
}

module_init(usb3503_init);
module_exit(usb3503_exit);
module_i2c_driver(usb3503_driver);

MODULE_AUTHOR("Dongjin Kim <tobetter@gmail.com>");
MODULE_DESCRIPTION("USB3503 USB HUB driver");
Expand Down

0 comments on commit 8244ac0

Please sign in to comment.