diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:34:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:34:02 -0500 |
commit | 65db43054065790a75291b0834657445fea2cf56 (patch) | |
tree | 000b010ed36dc99c4695178a6cb8a797a3d24865 /drivers/usb/misc/usblcd.c | |
parent | f3a6a4b6cfc80e57bf16bb12f9425bec1a5731a9 (diff) |
USB: convert drivers/usb/* to use module_usb_driver()
This converts the drivers in drivers/usb/* 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: Simon Arlott <cxacru@fire.lp0.eu>
Cc: Duncan Sands <duncan.sands@free.fr>
Cc: Matthieu CASTET <castet.matthieu@free.fr>
Cc: Stanislaw Gruszka <stf_xl@wp.pl>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Juergen Stuber <starblue@users.sourceforge.net>
Cc: Cesar Miquel <miquel@df.uba.ar>
Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Michael Hund <mhund@ld-didactic.de>
Cc: Zack Parsons <k3bacon@gmail.com>
Cc: Melchior FRANZ <mfranz@aon.at>
Cc: Tomoki Sekiyama <tomoki.sekiyama@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/misc/usblcd.c')
-rw-r--r-- | drivers/usb/misc/usblcd.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/usb/misc/usblcd.c b/drivers/usb/misc/usblcd.c index 1871cdf10da3..e2b4bd31c2b6 100644 --- a/drivers/usb/misc/usblcd.c +++ b/drivers/usb/misc/usblcd.c | |||
@@ -450,25 +450,7 @@ static struct usb_driver lcd_driver = { | |||
450 | .supports_autosuspend = 1, | 450 | .supports_autosuspend = 1, |
451 | }; | 451 | }; |
452 | 452 | ||
453 | static int __init usb_lcd_init(void) | 453 | module_usb_driver(lcd_driver); |
454 | { | ||
455 | int result; | ||
456 | |||
457 | result = usb_register(&lcd_driver); | ||
458 | if (result) | ||
459 | err("usb_register failed. Error number %d", result); | ||
460 | |||
461 | return result; | ||
462 | } | ||
463 | |||
464 | |||
465 | static void __exit usb_lcd_exit(void) | ||
466 | { | ||
467 | usb_deregister(&lcd_driver); | ||
468 | } | ||
469 | |||
470 | module_init(usb_lcd_init); | ||
471 | module_exit(usb_lcd_exit); | ||
472 | 454 | ||
473 | MODULE_AUTHOR("Georges Toth <g.toth@e-biz.lu>"); | 455 | MODULE_AUTHOR("Georges Toth <g.toth@e-biz.lu>"); |
474 | MODULE_DESCRIPTION(DRIVER_VERSION); | 456 | MODULE_DESCRIPTION(DRIVER_VERSION); |