diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:44:20 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:44:20 -0500 |
commit | d632eb1bf22e11def74e4e53cc47d790fbdba105 (patch) | |
tree | 3cc5f929264ac1c3cffd9646f8ebdaf4e5a9fd33 /drivers/net/can/usb | |
parent | bac2c126e452eb00f91305ba2c04a8b2bd95acf0 (diff) |
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>
Diffstat (limited to 'drivers/net/can/usb')
-rw-r--r-- | drivers/net/can/usb/ems_usb.c | 26 | ||||
-rw-r--r-- | drivers/net/can/usb/esd_usb2.c | 23 |
2 files changed, 2 insertions, 47 deletions
diff --git a/drivers/net/can/usb/ems_usb.c b/drivers/net/can/usb/ems_usb.c index a72c7bfb4090..9697c14b8dc6 100644 --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c | |||
@@ -1115,28 +1115,4 @@ static struct usb_driver ems_usb_driver = { | |||
1115 | .id_table = ems_usb_table, | 1115 | .id_table = ems_usb_table, |
1116 | }; | 1116 | }; |
1117 | 1117 | ||
1118 | static int __init ems_usb_init(void) | 1118 | module_usb_driver(ems_usb_driver); |
1119 | { | ||
1120 | int err; | ||
1121 | |||
1122 | printk(KERN_INFO "CPC-USB kernel driver loaded\n"); | ||
1123 | |||
1124 | /* register this driver with the USB subsystem */ | ||
1125 | err = usb_register(&ems_usb_driver); | ||
1126 | |||
1127 | if (err) { | ||
1128 | err("usb_register failed. Error number %d\n", err); | ||
1129 | return err; | ||
1130 | } | ||
1131 | |||
1132 | return 0; | ||
1133 | } | ||
1134 | |||
1135 | static void __exit ems_usb_exit(void) | ||
1136 | { | ||
1137 | /* deregister this driver with the USB subsystem */ | ||
1138 | usb_deregister(&ems_usb_driver); | ||
1139 | } | ||
1140 | |||
1141 | module_init(ems_usb_init); | ||
1142 | module_exit(ems_usb_exit); | ||
diff --git a/drivers/net/can/usb/esd_usb2.c b/drivers/net/can/usb/esd_usb2.c index eb8b0e600282..92774637aad8 100644 --- a/drivers/net/can/usb/esd_usb2.c +++ b/drivers/net/can/usb/esd_usb2.c | |||
@@ -1108,25 +1108,4 @@ static struct usb_driver esd_usb2_driver = { | |||
1108 | .id_table = esd_usb2_table, | 1108 | .id_table = esd_usb2_table, |
1109 | }; | 1109 | }; |
1110 | 1110 | ||
1111 | static int __init esd_usb2_init(void) | 1111 | module_usb_driver(esd_usb2_driver); |
1112 | { | ||
1113 | int err; | ||
1114 | |||
1115 | /* register this driver with the USB subsystem */ | ||
1116 | err = usb_register(&esd_usb2_driver); | ||
1117 | |||
1118 | if (err) { | ||
1119 | err("usb_register failed. Error number %d\n", err); | ||
1120 | return err; | ||
1121 | } | ||
1122 | |||
1123 | return 0; | ||
1124 | } | ||
1125 | module_init(esd_usb2_init); | ||
1126 | |||
1127 | static void __exit esd_usb2_exit(void) | ||
1128 | { | ||
1129 | /* deregister this driver with the USB subsystem */ | ||
1130 | usb_deregister(&esd_usb2_driver); | ||
1131 | } | ||
1132 | module_exit(esd_usb2_exit); | ||