Commit 48bf7e1a authored by Gianluca Gennari's avatar Gianluca Gennari Committed by Mauro Carvalho Chehab

[media] af9035: use module_usb_driver macro

Let's save a few lines of code using the module_usb_driver macro.
Signed-off-by: default avatarGianluca Gennari <gennarone@gmail.com>
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent ce1fe379
...@@ -973,31 +973,7 @@ static struct usb_driver af9035_usb_driver = { ...@@ -973,31 +973,7 @@ static struct usb_driver af9035_usb_driver = {
.id_table = af9035_id, .id_table = af9035_id,
}; };
/* module stuff */ module_usb_driver(af9035_usb_driver);
static int __init af9035_usb_module_init(void)
{
int ret;
ret = usb_register(&af9035_usb_driver);
if (ret < 0)
goto err;
return 0;
err:
pr_debug("%s: failed=%d\n", __func__, ret);
return ret;
}
static void __exit af9035_usb_module_exit(void)
{
/* deregister this driver from the USB subsystem */
usb_deregister(&af9035_usb_driver);
}
module_init(af9035_usb_module_init);
module_exit(af9035_usb_module_exit);
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>"); MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
MODULE_DESCRIPTION("Afatech AF9035 driver"); MODULE_DESCRIPTION("Afatech AF9035 driver");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment