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 <[email protected]>
Cc: Jean Delvare <[email protected]>
Cc: Ben Dooks <[email protected]>
Cc: Till Harbaum <[email protected]>
Cc: Karsten Keil <[email protected]>
Cc: Chris Ball <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Lauro Ramos Venancio <[email protected]>
Cc: Aloisio Almeida Jr <[email protected]>
Cc: Samuel Ortiz <[email protected]>
Cc: Steve Glendinning <[email protected]>
Cc: Florian Tobias Schandinat <[email protected]>
Cc: Evgeniy Polyakov <[email protected]>
Cc: Wim Van Sebroeck <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Jesper Juhl <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: Jamie Iles <[email protected]>
Cc: Andrew Morton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Greg Kroah-Hartman 2011-11-18 09:52:10 -08:00
commit fe7484834b
12 changed files with 12 additions and 216 deletions

View file

@ -1002,26 +1002,7 @@ static void ds_disconnect(struct usb_interface *intf)
kfree(dev);
}
static int ds_init(void)
{
int err;
err = usb_register(&ds_driver);
if (err) {
printk(KERN_INFO "Failed to register DS9490R USB device: err=%d.\n", err);
return err;
}
return 0;
}
static void ds_fini(void)
{
usb_deregister(&ds_driver);
}
module_init(ds_init);
module_exit(ds_fini);
module_usb_driver(ds_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Evgeniy Polyakov <[email protected]>");