summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorSean Wang <sean.wang@mediatek.com>2019-03-14 05:01:59 +0800
committerMarcel Holtmann <marcel@holtmann.org>2019-04-23 18:09:07 +0200
commita6094a468ffca372cb0107cc6bafc7c992477e7b (patch)
tree1baf425c88954e6e35ad014f5f721fb538b948d3 /drivers/bluetooth
parentdb0a390835209c1c5dce7669de3d23a8cba10f34 (diff)
downloadlinux-a6094a468ffca372cb0107cc6bafc7c992477e7b.tar.bz2
Bluetooth: mediatek: Use module_sdio_driver helper
Macro module_sdio_driver is used for drivers whose init and exit paths only register and unregister to SDIO API. So remove boilerplate code to make code simpler by using module_sdio_driver. Suggested-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Sean Wang <sean.wang@mediatek.com> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btmtksdio.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/bluetooth/btmtksdio.c b/drivers/bluetooth/btmtksdio.c
index b4b8320f279e..befe43f9a34a 100644
--- a/drivers/bluetooth/btmtksdio.c
+++ b/drivers/bluetooth/btmtksdio.c
@@ -956,20 +956,7 @@ static struct sdio_driver btmtksdio_driver = {
.id_table = btmtksdio_table,
};
-static int __init btmtksdio_init(void)
-{
- BT_INFO("MediaTek Bluetooth SDIO driver ver %s", VERSION);
-
- return sdio_register_driver(&btmtksdio_driver);
-}
-
-static void __exit btmtksdio_exit(void)
-{
- sdio_unregister_driver(&btmtksdio_driver);
-}
-
-module_init(btmtksdio_init);
-module_exit(btmtksdio_exit);
+module_sdio_driver(btmtksdio_driver);
MODULE_AUTHOR("Sean Wang <sean.wang@mediatek.com>");
MODULE_DESCRIPTION("MediaTek Bluetooth SDIO driver ver " VERSION);