diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:47:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-18 12:47:34 -0500 |
commit | 93f1508cffc3d578c2b7bbbf298dc52326b80777 (patch) | |
tree | cf0d5682a008f3368321e5a1c26fbfbdb65c8d39 /drivers/bluetooth/bfusb.c | |
parent | ecb3b2b35db49778b6d89e3ffd0c400776c20735 (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/bfusb.c')
-rw-r--r-- | drivers/bluetooth/bfusb.c | 21 |
1 files changed, 1 insertions, 20 deletions
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 | ||
767 | static int __init bfusb_init(void) | 767 | module_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 | |||
780 | static void __exit bfusb_exit(void) | ||
781 | { | ||
782 | usb_deregister(&bfusb_driver); | ||
783 | } | ||
784 | |||
785 | module_init(bfusb_init); | ||
786 | module_exit(bfusb_exit); | ||
787 | 768 | ||
788 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); | 769 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
789 | MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION); | 770 | MODULE_DESCRIPTION("BlueFRITZ! USB driver ver " VERSION); |