diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:52:10 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:52:10 -0500 |
commit | fe7484834bb614c2c205726647635171ce6cc070 (patch) | |
tree | e96e560153c2d4a2b2ad1feba6cc4fe09dbb5a29 /drivers/i2c | |
parent | 424f0750edd5af866f80f5e65998e0610503cb5c (diff) |
USB: convert some miscellanies drivers to use module_usb_driver()
This converts the remaining USB drivers in the kernel 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: Guenter Roeck <guenter.roeck@ericsson.com>
Cc: Jean Delvare <khali@linux-fr.org>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: Till Harbaum <till@harbaum.org>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: Chris Ball <cjb@laptop.org>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Cc: Steve Glendinning <steve.glendinning@smsc.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Evgeniy Polyakov <zbr@ioremap.net>
Cc: Wim Van Sebroeck <wim@iguana.be>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Cc: Jamie Iles <jamie@jamieiles.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c')
-rw-r--r-- | drivers/i2c/busses/i2c-diolan-u2c.c | 15 | ||||
-rw-r--r-- | drivers/i2c/busses/i2c-tiny-usb.c | 15 |
2 files changed, 2 insertions, 28 deletions
diff --git a/drivers/i2c/busses/i2c-diolan-u2c.c b/drivers/i2c/busses/i2c-diolan-u2c.c index 76366716a854..7eb19a5222f2 100644 --- a/drivers/i2c/busses/i2c-diolan-u2c.c +++ b/drivers/i2c/busses/i2c-diolan-u2c.c | |||
@@ -515,20 +515,7 @@ static struct usb_driver diolan_u2c_driver = { | |||
515 | .id_table = diolan_u2c_table, | 515 | .id_table = diolan_u2c_table, |
516 | }; | 516 | }; |
517 | 517 | ||
518 | static int __init diolan_u2c_init(void) | 518 | module_usb_driver(diolan_u2c_driver); |
519 | { | ||
520 | /* register this driver with the USB subsystem */ | ||
521 | return usb_register(&diolan_u2c_driver); | ||
522 | } | ||
523 | |||
524 | static void __exit diolan_u2c_exit(void) | ||
525 | { | ||
526 | /* deregister this driver with the USB subsystem */ | ||
527 | usb_deregister(&diolan_u2c_driver); | ||
528 | } | ||
529 | |||
530 | module_init(diolan_u2c_init); | ||
531 | module_exit(diolan_u2c_exit); | ||
532 | 519 | ||
533 | MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); | 520 | MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); |
534 | MODULE_DESCRIPTION(DRIVER_NAME " driver"); | 521 | MODULE_DESCRIPTION(DRIVER_NAME " driver"); |
diff --git a/drivers/i2c/busses/i2c-tiny-usb.c b/drivers/i2c/busses/i2c-tiny-usb.c index d03b04002f0d..f07307ff360d 100644 --- a/drivers/i2c/busses/i2c-tiny-usb.c +++ b/drivers/i2c/busses/i2c-tiny-usb.c | |||
@@ -262,20 +262,7 @@ static struct usb_driver i2c_tiny_usb_driver = { | |||
262 | .id_table = i2c_tiny_usb_table, | 262 | .id_table = i2c_tiny_usb_table, |
263 | }; | 263 | }; |
264 | 264 | ||
265 | static int __init usb_i2c_tiny_usb_init(void) | 265 | module_usb_driver(i2c_tiny_usb_driver); |
266 | { | ||
267 | /* register this driver with the USB subsystem */ | ||
268 | return usb_register(&i2c_tiny_usb_driver); | ||
269 | } | ||
270 | |||
271 | static void __exit usb_i2c_tiny_usb_exit(void) | ||
272 | { | ||
273 | /* deregister this driver with the USB subsystem */ | ||
274 | usb_deregister(&i2c_tiny_usb_driver); | ||
275 | } | ||
276 | |||
277 | module_init(usb_i2c_tiny_usb_init); | ||
278 | module_exit(usb_i2c_tiny_usb_exit); | ||
279 | 266 | ||
280 | /* ----- end of usb layer ------------------------------------------------ */ | 267 | /* ----- end of usb layer ------------------------------------------------ */ |
281 | 268 | ||