summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorGianluca Gennari <gennarone@gmail.com>2012-04-03 00:25:17 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-04-09 21:52:48 +0400
commit48bf7e1a9dce24adf79ea118ef001e781fb0e2e4 (patch)
treed8dc4574978ebaf780aec31a4013925aa84a05a0 /drivers/media
parentce1fe3799c0e92b9219ab123002d0383c5c3cc07 (diff)
downloadlinux-48bf7e1a9dce24adf79ea118ef001e781fb0e2e4.tar.xz
[media] af9035: use module_usb_driver macro
Let's save a few lines of code using the module_usb_driver macro. Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-usb/af9035.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9035.c b/drivers/media/dvb/dvb-usb/af9035.c
index 970bdb6bb60a..73044632d943 100644
--- a/drivers/media/dvb/dvb-usb/af9035.c
+++ b/drivers/media/dvb/dvb-usb/af9035.c
@@ -973,31 +973,7 @@ static struct usb_driver af9035_usb_driver = {
.id_table = af9035_id,
};
-/* module stuff */
-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_usb_driver(af9035_usb_driver);
MODULE_AUTHOR("Antti Palosaari <crope@iki.fi>");
MODULE_DESCRIPTION("Afatech AF9035 driver");