Commit 93f1508c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: convert drivers/bluetooth/* to use module_usb_driver()

This converts the drivers in drivers/bluetooth/* 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: Marcel Holtmann <marcel@holtmann.org>
Cc: "Gustavo F. Padovan" <padovan@profusion.mobi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent ecb3b2b3
......@@ -423,19 +423,7 @@ static struct usb_driver ath3k_driver = {
.id_table = ath3k_table,
};
static int __init ath3k_init(void)
{
BT_INFO("Atheros AR30xx firmware driver ver %s", VERSION);
return usb_register(&ath3k_driver);
}
static void __exit ath3k_exit(void)
{
usb_deregister(&ath3k_driver);
}
module_init(ath3k_init);
module_exit(ath3k_exit);
module_usb_driver(ath3k_driver);
MODULE_AUTHOR("Atheros Communications");
MODULE_DESCRIPTION("Atheros AR30xx firmware driver");
......
......@@ -281,26 +281,7 @@ static struct usb_driver bcm203x_driver = {
.id_table = bcm203x_table,
};
static int __init bcm203x_init(void)
{
int err;
BT_INFO("Broadcom Blutonium firmware driver ver %s", VERSION);
err = usb_register(&bcm203x_driver);
if (err < 0)
BT_ERR("Failed to register USB driver");
return err;
}
static void __exit bcm203x_exit(void)
{
usb_deregister(&bcm203x_driver);
}
module_init(bcm203x_init);
module_exit(bcm203x_exit);
module_usb_driver(bcm203x_driver);
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Broadcom Blutonium firmware driver ver " VERSION);
......
......@@ -764,26 +764,7 @@ static struct usb_driver bfusb_driver = {
.id_table = bfusb_table,
};
static int __init bfusb_init(void)
{
int err;
BT_INFO("BlueFRITZ! USB driver ver %s", VERSION);
err = usb_register(&bfusb_driver);
if (err < 0)
BT_ERR("Failed to register BlueFRITZ! USB driver");
return err;
}
static void __exit bfusb_exit(void)
{
usb_deregister(&bfusb_driver);
}
module_init(bfusb_init);
module_exit(bfusb_exit);
module_usb_driver(bfusb_driver);
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION);
......
......@@ -521,20 +521,7 @@ static struct usb_driver bpa10x_driver = {
.id_table = bpa10x_table,
};
static int __init bpa10x_init(void)
{
BT_INFO("Digianswer Bluetooth USB driver ver %s", VERSION);
return usb_register(&bpa10x_driver);
}
static void __exit bpa10x_exit(void)
{
usb_deregister(&bpa10x_driver);
}
module_init(bpa10x_init);
module_exit(bpa10x_exit);
module_usb_driver(bpa10x_driver);
MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
MODULE_DESCRIPTION("Digianswer Bluetooth USB driver ver " VERSION);
......
......@@ -1220,20 +1220,7 @@ static struct usb_driver btusb_driver = {
.supports_autosuspend = 1,
};
static int __init btusb_init(void)
{
BT_INFO("Generic Bluetooth USB driver ver %s", VERSION);
return usb_register(&btusb_driver);
}
static void __exit btusb_exit(void)
{
usb_deregister(&btusb_driver);
}
module_init(btusb_init);
module_exit(btusb_exit);
module_usb_driver(btusb_driver);
module_param(ignore_dga, bool, 0644);
MODULE_PARM_DESC(ignore_dga, "Ignore devices with id 08fd:0001");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment