USB: convert drivers/net/* to use module_usb_driver()
This converts the drivers in drivers/net/* 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: Wolfgang Grandegger <wg@grandegger.com> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: Oliver Neukum <oliver@neukum.name> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Petko Manolov <petkan@users.sourceforge.net> Cc: Steve Glendinning <steve.glendinning@smsc.com> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Dan Williams <dcbw@redhat.com> Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Gertjan van Wingerde <gwingerde@gmail.com> Cc: Helmut Schaa <helmut.schaa@googlemail.com> Cc: Herton Ronaldo Krzesinski <herton@canonical.com> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: Chaoming Li <chaoming_li@realsil.com.cn> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: "David S. Miller" <davem@davemloft.net> Cc: Roel Kluin <roel.kluin@gmail.com> Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Cc: Jiri Pirko <jpirko@redhat.com> Cc: Pavel Roskin <proski@gnu.org> Cc: Yoann DI-RUZZA <y.diruzza@lim.eu> Cc: George <george0505@realtek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -1914,41 +1914,8 @@ static struct usb_driver irda_driver = {
|
||||
#endif
|
||||
};
|
||||
|
||||
/************************* MODULE CALLBACKS *************************/
|
||||
/*
|
||||
* Deal with module insertion/removal
|
||||
* Mostly tell USB about our existence
|
||||
*/
|
||||
module_usb_driver(irda_driver);
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/*
|
||||
* Module insertion
|
||||
*/
|
||||
static int __init usb_irda_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = usb_register(&irda_driver);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
IRDA_MESSAGE("USB IrDA support registered\n");
|
||||
return 0;
|
||||
}
|
||||
module_init(usb_irda_init);
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/*
|
||||
* Module removal
|
||||
*/
|
||||
static void __exit usb_irda_cleanup(void)
|
||||
{
|
||||
/* Deregister the driver and remove all pending instances */
|
||||
usb_deregister(&irda_driver);
|
||||
}
|
||||
module_exit(usb_irda_cleanup);
|
||||
|
||||
/*------------------------------------------------------------------*/
|
||||
/*
|
||||
* Module parameters
|
||||
*/
|
||||
|
Reference in New Issue
Block a user