diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:46:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:46:12 -0500 |
commit | ecb3b2b35db49778b6d89e3ffd0c400776c20735 (patch) | |
tree | cdec945a8b6651154633b986a318d0441ff3c239 /drivers/media/rc | |
parent | d632eb1bf22e11def74e4e53cc47d790fbdba105 (diff) |
USB: convert drivers/media/* to use module_usb_driver()
This converts the drivers in drivers/media/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.
Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Luca Risolia <luca.risolia@studio.unibo.it>
Cc: Jean-Francois Moine <moinejf@free.fr>
Cc: Frank Zago <frank@zago.net>
Cc: Olivier Lorin <o.lorin@laposte.net>
Cc: Erik Andren <erik.andren@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Brian Johnson <brijohn@gmail.com>
Cc: Leandro Costantino <lcostantino@gmail.com>
Cc: Antoine Jacquet <royale@zerezo.com>
Cc: Jarod Wilson <jarod@redhat.com>
Cc: Florian Mickler <florian@mickler.org>
Cc: Antti Palosaari <crope@iki.fi>
Cc: Michael Krufky <mkrufky@kernellabs.com>
Cc: "David Härdeman" <david@hardeman.nu>
Cc: Florent Audebert <florent.audebert@anevia.com>
Cc: Sam Doshi <sam@metal-fish.co.uk>
Cc: Manu Abraham <manu@linuxtv.org>
Cc: Olivier Grenie <olivier.grenie@dibcom.fr>
Cc: Patrick Boettcher <patrick.boettcher@dibcom.fr>
Cc: "Igor M. Liplianin" <liplianin@me.by>
Cc: Derek Kelly <user.vdr@gmail.com>
Cc: Malcolm Priestley <tvboxspy@gmail.com>
Cc: Steven Toth <stoth@kernellabs.com>
Cc: "André Weidemann" <Andre.Weidemann@web.de>
Cc: Martin Wilks <m.wilks@technisat.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: Jose Alberto Reguero <jareguero@telefonica.net>
Cc: David Henningsson <david.henningsson@canonical.com>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Alexey Khoroshilov <khoroshilov@ispras.ru>
Cc: Anssi Hannula <anssi.hannula@iki.fi>
Cc: Rafi Rubin <rafi@seas.upenn.edu>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Paul Bender <pebender@gmail.com>
Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Cc: "Márcio A Alves" <froooozen@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Chris Rankin <rankincj@yahoo.com>
Cc: Lee Jones <lee.jones@canonical.com>
Cc: Andy Walls <awalls@md.metrocast.net>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mike Frysinger <vapier@gentoo.org>
Cc: Dean Anderson <linux-dev@sensoray.com>
Cc: Pete Eberlein <pete@sensoray.com>
Cc: Arvydas Sidorenko <asido4@gmail.com>
Cc: Andrea Anacleto <andreaanacleto@libero.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/media/rc')
-rw-r--r-- | drivers/media/rc/ati_remote.c | 33 | ||||
-rw-r--r-- | drivers/media/rc/imon.c | 21 | ||||
-rw-r--r-- | drivers/media/rc/mceusb.c | 20 | ||||
-rw-r--r-- | drivers/media/rc/redrat3.c | 20 | ||||
-rw-r--r-- | drivers/media/rc/streamzap.c | 28 |
5 files changed, 5 insertions, 117 deletions
diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c index 303f22ea04c0..4363bc38aab0 100644 --- a/drivers/media/rc/ati_remote.c +++ b/drivers/media/rc/ati_remote.c | |||
@@ -908,38 +908,7 @@ static void ati_remote_disconnect(struct usb_interface *interface) | |||
908 | kfree(ati_remote); | 908 | kfree(ati_remote); |
909 | } | 909 | } |
910 | 910 | ||
911 | /* | 911 | module_usb_driver(ati_remote_driver); |
912 | * ati_remote_init | ||
913 | */ | ||
914 | static int __init ati_remote_init(void) | ||
915 | { | ||
916 | int result; | ||
917 | |||
918 | result = usb_register(&ati_remote_driver); | ||
919 | if (result) | ||
920 | printk(KERN_ERR KBUILD_MODNAME | ||
921 | ": usb_register error #%d\n", result); | ||
922 | else | ||
923 | printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":" | ||
924 | DRIVER_DESC "\n"); | ||
925 | |||
926 | return result; | ||
927 | } | ||
928 | |||
929 | /* | ||
930 | * ati_remote_exit | ||
931 | */ | ||
932 | static void __exit ati_remote_exit(void) | ||
933 | { | ||
934 | usb_deregister(&ati_remote_driver); | ||
935 | } | ||
936 | |||
937 | /* | ||
938 | * module specification | ||
939 | */ | ||
940 | |||
941 | module_init(ati_remote_init); | ||
942 | module_exit(ati_remote_exit); | ||
943 | 912 | ||
944 | MODULE_AUTHOR(DRIVER_AUTHOR); | 913 | MODULE_AUTHOR(DRIVER_AUTHOR); |
945 | MODULE_DESCRIPTION(DRIVER_DESC); | 914 | MODULE_DESCRIPTION(DRIVER_DESC); |
diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 6ed96465137a..3aeb29a7ce11 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c | |||
@@ -2458,23 +2458,4 @@ static int imon_resume(struct usb_interface *intf) | |||
2458 | return rc; | 2458 | return rc; |
2459 | } | 2459 | } |
2460 | 2460 | ||
2461 | static int __init imon_init(void) | 2461 | module_usb_driver(imon_driver); |
2462 | { | ||
2463 | int rc; | ||
2464 | |||
2465 | rc = usb_register(&imon_driver); | ||
2466 | if (rc) { | ||
2467 | pr_err("usb register failed(%d)\n", rc); | ||
2468 | rc = -ENODEV; | ||
2469 | } | ||
2470 | |||
2471 | return rc; | ||
2472 | } | ||
2473 | |||
2474 | static void __exit imon_exit(void) | ||
2475 | { | ||
2476 | usb_deregister(&imon_driver); | ||
2477 | } | ||
2478 | |||
2479 | module_init(imon_init); | ||
2480 | module_exit(imon_exit); | ||
diff --git a/drivers/media/rc/mceusb.c b/drivers/media/rc/mceusb.c index 60d3c1e09712..20bb12d6fbbe 100644 --- a/drivers/media/rc/mceusb.c +++ b/drivers/media/rc/mceusb.c | |||
@@ -1448,25 +1448,7 @@ static struct usb_driver mceusb_dev_driver = { | |||
1448 | .id_table = mceusb_dev_table | 1448 | .id_table = mceusb_dev_table |
1449 | }; | 1449 | }; |
1450 | 1450 | ||
1451 | static int __init mceusb_dev_init(void) | 1451 | module_usb_driver(mceusb_dev_driver); |
1452 | { | ||
1453 | int ret; | ||
1454 | |||
1455 | ret = usb_register(&mceusb_dev_driver); | ||
1456 | if (ret < 0) | ||
1457 | printk(KERN_ERR DRIVER_NAME | ||
1458 | ": usb register failed, result = %d\n", ret); | ||
1459 | |||
1460 | return ret; | ||
1461 | } | ||
1462 | |||
1463 | static void __exit mceusb_dev_exit(void) | ||
1464 | { | ||
1465 | usb_deregister(&mceusb_dev_driver); | ||
1466 | } | ||
1467 | |||
1468 | module_init(mceusb_dev_init); | ||
1469 | module_exit(mceusb_dev_exit); | ||
1470 | 1452 | ||
1471 | MODULE_DESCRIPTION(DRIVER_DESC); | 1453 | MODULE_DESCRIPTION(DRIVER_DESC); |
1472 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1454 | MODULE_AUTHOR(DRIVER_AUTHOR); |
diff --git a/drivers/media/rc/redrat3.c b/drivers/media/rc/redrat3.c index 61287fcca61a..07322fb75eff 100644 --- a/drivers/media/rc/redrat3.c +++ b/drivers/media/rc/redrat3.c | |||
@@ -1300,25 +1300,7 @@ static struct usb_driver redrat3_dev_driver = { | |||
1300 | .id_table = redrat3_dev_table | 1300 | .id_table = redrat3_dev_table |
1301 | }; | 1301 | }; |
1302 | 1302 | ||
1303 | static int __init redrat3_dev_init(void) | 1303 | module_usb_driver(redrat3_dev_driver); |
1304 | { | ||
1305 | int ret; | ||
1306 | |||
1307 | ret = usb_register(&redrat3_dev_driver); | ||
1308 | if (ret < 0) | ||
1309 | pr_err(DRIVER_NAME | ||
1310 | ": usb register failed, result = %d\n", ret); | ||
1311 | |||
1312 | return ret; | ||
1313 | } | ||
1314 | |||
1315 | static void __exit redrat3_dev_exit(void) | ||
1316 | { | ||
1317 | usb_deregister(&redrat3_dev_driver); | ||
1318 | } | ||
1319 | |||
1320 | module_init(redrat3_dev_init); | ||
1321 | module_exit(redrat3_dev_exit); | ||
1322 | 1304 | ||
1323 | MODULE_DESCRIPTION(DRIVER_DESC); | 1305 | MODULE_DESCRIPTION(DRIVER_DESC); |
1324 | MODULE_AUTHOR(DRIVER_AUTHOR); | 1306 | MODULE_AUTHOR(DRIVER_AUTHOR); |
diff --git a/drivers/media/rc/streamzap.c b/drivers/media/rc/streamzap.c index e435d94c0776..b1d29d09eeae 100644 --- a/drivers/media/rc/streamzap.c +++ b/drivers/media/rc/streamzap.c | |||
@@ -523,33 +523,7 @@ static int streamzap_resume(struct usb_interface *intf) | |||
523 | return 0; | 523 | return 0; |
524 | } | 524 | } |
525 | 525 | ||
526 | /** | 526 | module_usb_driver(streamzap_driver); |
527 | * streamzap_init | ||
528 | */ | ||
529 | static int __init streamzap_init(void) | ||
530 | { | ||
531 | int ret; | ||
532 | |||
533 | /* register this driver with the USB subsystem */ | ||
534 | ret = usb_register(&streamzap_driver); | ||
535 | if (ret < 0) | ||
536 | printk(KERN_ERR DRIVER_NAME ": usb register failed, " | ||
537 | "result = %d\n", ret); | ||
538 | |||
539 | return ret; | ||
540 | } | ||
541 | |||
542 | /** | ||
543 | * streamzap_exit | ||
544 | */ | ||
545 | static void __exit streamzap_exit(void) | ||
546 | { | ||
547 | usb_deregister(&streamzap_driver); | ||
548 | } | ||
549 | |||
550 | |||
551 | module_init(streamzap_init); | ||
552 | module_exit(streamzap_exit); | ||
553 | 527 | ||
554 | MODULE_AUTHOR("Jarod Wilson <jarod@wilsonet.com>"); | 528 | MODULE_AUTHOR("Jarod Wilson <jarod@wilsonet.com>"); |
555 | MODULE_DESCRIPTION(DRIVER_DESC); | 529 | MODULE_DESCRIPTION(DRIVER_DESC); |