aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-11-18 12:52:10 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-18 12:52:10 -0500
commitfe7484834bb614c2c205726647635171ce6cc070 (patch)
treee96e560153c2d4a2b2ad1feba6cc4fe09dbb5a29 /drivers/i2c
parent424f0750edd5af866f80f5e65998e0610503cb5c (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.c15
-rw-r--r--drivers/i2c/busses/i2c-tiny-usb.c15
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
518static int __init diolan_u2c_init(void) 518module_usb_driver(diolan_u2c_driver);
519{
520 /* register this driver with the USB subsystem */
521 return usb_register(&diolan_u2c_driver);
522}
523
524static void __exit diolan_u2c_exit(void)
525{
526 /* deregister this driver with the USB subsystem */
527 usb_deregister(&diolan_u2c_driver);
528}
529
530module_init(diolan_u2c_init);
531module_exit(diolan_u2c_exit);
532 519
533MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>"); 520MODULE_AUTHOR("Guenter Roeck <guenter.roeck@ericsson.com>");
534MODULE_DESCRIPTION(DRIVER_NAME " driver"); 521MODULE_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
265static int __init usb_i2c_tiny_usb_init(void) 265module_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
271static 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
277module_init(usb_i2c_tiny_usb_init);
278module_exit(usb_i2c_tiny_usb_exit);
279 266
280/* ----- end of usb layer ------------------------------------------------ */ 267/* ----- end of usb layer ------------------------------------------------ */
281 268