aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2011-11-18 12:47:34 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-18 12:47:34 -0500
commit93f1508cffc3d578c2b7bbbf298dc52326b80777 (patch)
treecf0d5682a008f3368321e5a1c26fbfbdb65c8d39 /drivers/bluetooth
parentecb3b2b35db49778b6d89e3ffd0c400776c20735 (diff)
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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/ath3k.c14
-rw-r--r--drivers/bluetooth/bcm203x.c21
-rw-r--r--drivers/bluetooth/bfusb.c21
-rw-r--r--drivers/bluetooth/bpa10x.c15
-rw-r--r--drivers/bluetooth/btusb.c15
5 files changed, 5 insertions, 81 deletions
diff --git a/drivers/bluetooth/ath3k.c b/drivers/bluetooth/ath3k.c
index 106beb194f3c..cf77a9a2bfa4 100644
--- a/drivers/bluetooth/ath3k.c
+++ b/drivers/bluetooth/ath3k.c
@@ -423,19 +423,7 @@ static struct usb_driver ath3k_driver = {
423 .id_table = ath3k_table, 423 .id_table = ath3k_table,
424}; 424};
425 425
426static int __init ath3k_init(void) 426module_usb_driver(ath3k_driver);
427{
428 BT_INFO("Atheros AR30xx firmware driver ver %s", VERSION);
429 return usb_register(&ath3k_driver);
430}
431
432static void __exit ath3k_exit(void)
433{
434 usb_deregister(&ath3k_driver);
435}
436
437module_init(ath3k_init);
438module_exit(ath3k_exit);
439 427
440MODULE_AUTHOR("Atheros Communications"); 428MODULE_AUTHOR("Atheros Communications");
441MODULE_DESCRIPTION("Atheros AR30xx firmware driver"); 429MODULE_DESCRIPTION("Atheros AR30xx firmware driver");
diff --git a/drivers/bluetooth/bcm203x.c b/drivers/bluetooth/bcm203x.c
index 54952ab800b8..1e742a50e2cd 100644
--- a/drivers/bluetooth/bcm203x.c
+++ b/drivers/bluetooth/bcm203x.c
@@ -281,26 +281,7 @@ static struct usb_driver bcm203x_driver = {
281 .id_table = bcm203x_table, 281 .id_table = bcm203x_table,
282}; 282};
283 283
284static int __init bcm203x_init(void) 284module_usb_driver(bcm203x_driver);
285{
286 int err;
287
288 BT_INFO("Broadcom Blutonium firmware driver ver %s", VERSION);
289
290 err = usb_register(&bcm203x_driver);
291 if (err < 0)
292 BT_ERR("Failed to register USB driver");
293
294 return err;
295}
296
297static void __exit bcm203x_exit(void)
298{
299 usb_deregister(&bcm203x_driver);
300}
301
302module_init(bcm203x_init);
303module_exit(bcm203x_exit);
304 285
305MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 286MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
306MODULE_DESCRIPTION("Broadcom Blutonium firmware driver ver " VERSION); 287MODULE_DESCRIPTION("Broadcom Blutonium firmware driver ver " VERSION);
diff --git a/drivers/bluetooth/bfusb.c b/drivers/bluetooth/bfusb.c
index 61b591470a90..e64a290a1b98 100644
--- a/drivers/bluetooth/bfusb.c
+++ b/drivers/bluetooth/bfusb.c
@@ -764,26 +764,7 @@ static struct usb_driver bfusb_driver = {
764 .id_table = bfusb_table, 764 .id_table = bfusb_table,
765}; 765};
766 766
767static int __init bfusb_init(void) 767module_usb_driver(bfusb_driver);
768{
769 int err;
770
771 BT_INFO("BlueFRITZ! USB driver ver %s", VERSION);
772
773 err = usb_register(&bfusb_driver);
774 if (err < 0)
775 BT_ERR("Failed to register BlueFRITZ! USB driver");
776
777 return err;
778}
779
780static void __exit bfusb_exit(void)
781{
782 usb_deregister(&bfusb_driver);
783}
784
785module_init(bfusb_init);
786module_exit(bfusb_exit);
787 768
788MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 769MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
789MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION); 770MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION);
diff --git a/drivers/bluetooth/bpa10x.c b/drivers/bluetooth/bpa10x.c
index 751b338d904a..62831603de5e 100644
--- a/drivers/bluetooth/bpa10x.c
+++ b/drivers/bluetooth/bpa10x.c
@@ -521,20 +521,7 @@ static struct usb_driver bpa10x_driver = {
521 .id_table = bpa10x_table, 521 .id_table = bpa10x_table,
522}; 522};
523 523
524static int __init bpa10x_init(void) 524module_usb_driver(bpa10x_driver);
525{
526 BT_INFO("Digianswer Bluetooth USB driver ver %s", VERSION);
527
528 return usb_register(&bpa10x_driver);
529}
530
531static void __exit bpa10x_exit(void)
532{
533 usb_deregister(&bpa10x_driver);
534}
535
536module_init(bpa10x_init);
537module_exit(bpa10x_exit);
538 525
539MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); 526MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>");
540MODULE_DESCRIPTION("Digianswer Bluetooth USB driver ver " VERSION); 527MODULE_DESCRIPTION("Digianswer Bluetooth USB driver ver " VERSION);
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index f9b726091ad0..b0e6d8d5b96a 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -1220,20 +1220,7 @@ static struct usb_driver btusb_driver = {
1220 .supports_autosuspend = 1, 1220 .supports_autosuspend = 1,
1221}; 1221};
1222 1222
1223static int __init btusb_init(void) 1223module_usb_driver(btusb_driver);
1224{
1225 BT_INFO("Generic Bluetooth USB driver ver %s", VERSION);
1226
1227 return usb_register(&btusb_driver);
1228}
1229
1230static void __exit btusb_exit(void)
1231{
1232 usb_deregister(&btusb_driver);
1233}
1234
1235module_init(btusb_init);
1236module_exit(btusb_exit);
1237 1224
1238module_param(ignore_dga, bool, 0644); 1225module_param(ignore_dga, bool, 0644);
1239MODULE_PARM_DESC(ignore_dga, "Ignore devices with id 08fd:0001"); 1226MODULE_PARM_DESC(ignore_dga, "Ignore devices with id 08fd:0001");