summaryrefslogtreecommitdiffstats
path: root/drivers/staging/media
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-25 14:33:06 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-25 14:33:06 -0700
commit9451df0ee893dbdfca626f2888654f321d241460 (patch)
tree5e00f998b1ae8663c512022a6bfaaab3682f7057 /drivers/staging/media
parentfee5952fba478a395798c99531dc095e440a6ef0 (diff)
downloadblackbird-op-linux-9451df0ee893dbdfca626f2888654f321d241460.tar.gz
blackbird-op-linux-9451df0ee893dbdfca626f2888654f321d241460.zip
USB: staging: media: as102: convert to use module_usb_driver
The as102 driver can be converted to use module_usb_driver() which saves a lot of code, and gets rid of an unwanted err() call at the same time. Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Sylwester Nawrocki <snjw23@gmail.com> Cc: Piotr Chmura <chmooreck@poczta.onet.pl> Cc: Devin Heitmueller <dheitmueller@kernellabs.com> Cc: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/media')
-rw-r--r--drivers/staging/media/as102/as102_drv.c34
1 files changed, 1 insertions, 33 deletions
diff --git a/drivers/staging/media/as102/as102_drv.c b/drivers/staging/media/as102/as102_drv.c
index ea4f992de235..ac92eaf6c74b 100644
--- a/drivers/staging/media/as102/as102_drv.c
+++ b/drivers/staging/media/as102/as102_drv.c
@@ -279,40 +279,8 @@ void as102_dvb_unregister(struct as102_dev_t *as102_dev)
pr_info("Unregistered device %s", as102_dev->name);
}
-static int __init as102_driver_init(void)
-{
- int ret;
-
- /* register this driver with the low level subsystem */
- ret = usb_register(&as102_usb_driver);
- if (ret)
- err("usb_register failed (ret = %d)", ret);
-
- return ret;
-}
-
-/*
- * Mandatory function : Adds a special section to the module indicating
- * where initialisation function is defined
- */
-module_init(as102_driver_init);
-
-/**
- * as102_driver_exit - as102 driver exit point
- *
- * This function is called when device has to be removed.
- */
-static void __exit as102_driver_exit(void)
-{
- /* deregister this driver with the low level bus subsystem */
- usb_deregister(&as102_usb_driver);
-}
+module_usb_driver(as102_usb_driver);
-/*
- * required function for unload: Adds a special section to the module
- * indicating where unload function is defined
- */
-module_exit(as102_driver_exit);
/* modinfo details */
MODULE_DESCRIPTION(DRIVER_FULL_NAME);
MODULE_LICENSE("GPL");
OpenPOWER on IntegriCloud