From ecb3b2b35db49778b6d89e3ffd0c400776c20735 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 18 Nov 2011 09:46:12 -0800 Subject: USB: convert drivers/media/* to use module_usb_driver() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Cc: Luca Risolia Cc: Jean-Francois Moine Cc: Frank Zago Cc: Olivier Lorin Cc: Erik Andren Cc: Hans de Goede Cc: Brian Johnson Cc: Leandro Costantino Cc: Antoine Jacquet Cc: Jarod Wilson Cc: Florian Mickler Cc: Antti Palosaari Cc: Michael Krufky Cc: "David Härdeman" Cc: Florent Audebert Cc: Sam Doshi Cc: Manu Abraham Cc: Olivier Grenie Cc: Patrick Boettcher Cc: "Igor M. Liplianin" Cc: Derek Kelly Cc: Malcolm Priestley Cc: Steven Toth Cc: "André Weidemann" Cc: Martin Wilks Cc: Tejun Heo Cc: Jose Alberto Reguero Cc: David Henningsson Cc: Paul Gortmaker Cc: Joe Perches Cc: Jesper Juhl Cc: Lucas De Marchi Cc: Hans Verkuil Cc: Alexey Khoroshilov Cc: Anssi Hannula Cc: Rafi Rubin Cc: Dan Carpenter Cc: Paul Bender Cc: Devin Heitmueller Cc: "Márcio A Alves" Cc: Julia Lawall Cc: Laurent Pinchart Cc: Chris Rankin Cc: Lee Jones Cc: Andy Walls Cc: Andrew Morton Cc: Mike Frysinger Cc: Dean Anderson Cc: Pete Eberlein Cc: Arvydas Sidorenko Cc: Andrea Anacleto Signed-off-by: Greg Kroah-Hartman --- drivers/media/dvb/dvb-usb/a800.c | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'drivers/media/dvb/dvb-usb/a800.c') diff --git a/drivers/media/dvb/dvb-usb/a800.c b/drivers/media/dvb/dvb-usb/a800.c index 2aef3c89e9f..8d7fef84afd 100644 --- a/drivers/media/dvb/dvb-usb/a800.c +++ b/drivers/media/dvb/dvb-usb/a800.c @@ -183,26 +183,7 @@ static struct usb_driver a800_driver = { .id_table = a800_table, }; -/* module stuff */ -static int __init a800_module_init(void) -{ - int result; - if ((result = usb_register(&a800_driver))) { - err("usb_register failed. Error number %d",result); - return result; - } - - return 0; -} - -static void __exit a800_module_exit(void) -{ - /* deregister this driver from the USB subsystem */ - usb_deregister(&a800_driver); -} - -module_init (a800_module_init); -module_exit (a800_module_exit); +module_usb_driver(a800_driver); MODULE_AUTHOR("Patrick Boettcher "); MODULE_DESCRIPTION("AVerMedia AverTV DVB-T USB 2.0 (A800)"); -- cgit v1.2.3-70-g09d2