forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
Showing
12 changed files
with
12 additions
and
216 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -515,20 +515,7 @@ static struct usb_driver diolan_u2c_driver = { | |
.id_table = diolan_u2c_table, | ||
}; | ||
|
||
static int __init diolan_u2c_init(void) | ||
{ | ||
/* register this driver with the USB subsystem */ | ||
return usb_register(&diolan_u2c_driver); | ||
} | ||
|
||
static void __exit diolan_u2c_exit(void) | ||
{ | ||
/* deregister this driver with the USB subsystem */ | ||
usb_deregister(&diolan_u2c_driver); | ||
} | ||
|
||
module_init(diolan_u2c_init); | ||
module_exit(diolan_u2c_exit); | ||
module_usb_driver(diolan_u2c_driver); | ||
|
||
MODULE_AUTHOR("Guenter Roeck <[email protected]>"); | ||
MODULE_DESCRIPTION(DRIVER_NAME " driver"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -562,17 +562,7 @@ static struct usb_driver ushc_driver = { | |
.disconnect = ushc_disconnect, | ||
}; | ||
|
||
static int __init ushc_init(void) | ||
{ | ||
return usb_register(&ushc_driver); | ||
} | ||
module_init(ushc_init); | ||
|
||
static void __exit ushc_exit(void) | ||
{ | ||
usb_deregister(&ushc_driver); | ||
} | ||
module_exit(ushc_exit); | ||
module_usb_driver(ushc_driver); | ||
|
||
MODULE_DESCRIPTION("USB SD Host Controller driver"); | ||
MODULE_AUTHOR("David Vrabel <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1597,24 +1597,7 @@ static struct usb_driver pn533_driver = { | |
.id_table = pn533_table, | ||
}; | ||
|
||
static int __init pn533_init(void) | ||
{ | ||
int rc; | ||
|
||
rc = usb_register(&pn533_driver); | ||
if (rc) | ||
err("usb_register failed. Error number %d", rc); | ||
|
||
return rc; | ||
} | ||
|
||
static void __exit pn533_exit(void) | ||
{ | ||
usb_deregister(&pn533_driver); | ||
} | ||
|
||
module_init(pn533_init); | ||
module_exit(pn533_exit); | ||
module_usb_driver(pn533_driver); | ||
|
||
MODULE_AUTHOR("Lauro Ramos Venancio <[email protected]>," | ||
" Aloisio Almeida Jr <[email protected]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -914,17 +914,7 @@ static struct usb_driver hwarc_driver = { | |
.post_reset = hwarc_post_reset, | ||
}; | ||
|
||
static int __init hwarc_driver_init(void) | ||
{ | ||
return usb_register(&hwarc_driver); | ||
} | ||
module_init(hwarc_driver_init); | ||
|
||
static void __exit hwarc_driver_exit(void) | ||
{ | ||
usb_deregister(&hwarc_driver); | ||
} | ||
module_exit(hwarc_driver_exit); | ||
module_usb_driver(hwarc_driver); | ||
|
||
MODULE_AUTHOR("Inaky Perez-Gonzalez <[email protected]>"); | ||
MODULE_DESCRIPTION("Host Wireless Adapter Radio Control Driver"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -451,25 +451,7 @@ static struct usb_driver i1480_dfu_driver = { | |
.disconnect = NULL, | ||
}; | ||
|
||
|
||
/* | ||
* Initialize the i1480 DFU driver. | ||
* | ||
* We also need to register our function for guessing event sizes. | ||
*/ | ||
static int __init i1480_dfu_driver_init(void) | ||
{ | ||
return usb_register(&i1480_dfu_driver); | ||
} | ||
module_init(i1480_dfu_driver_init); | ||
|
||
|
||
static void __exit i1480_dfu_driver_exit(void) | ||
{ | ||
usb_deregister(&i1480_dfu_driver); | ||
} | ||
module_exit(i1480_dfu_driver_exit); | ||
|
||
module_usb_driver(i1480_dfu_driver); | ||
|
||
MODULE_AUTHOR("Inaky Perez-Gonzalez <[email protected]>"); | ||
MODULE_DESCRIPTION("Intel Wireless UWB Link 1480 firmware uploader for USB"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]>"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters