From a6094a468ffca372cb0107cc6bafc7c992477e7b Mon Sep 17 00:00:00 2001 From: Sean Wang Date: Thu, 14 Mar 2019 05:01:59 +0800 Subject: [PATCH] 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 Signed-off-by: Sean Wang Acked-by: Ulf Hansson Signed-off-by: Marcel Holtmann --- drivers/bluetooth/btmtksdio.c | 15 +-------------- 1 file changed, 1 insertion(+), 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 "); MODULE_DESCRIPTION("MediaTek Bluetooth SDIO driver ver " VERSION); -- 2.39.5