From: Sean Wang Date: Wed, 13 Mar 2019 21:02:00 +0000 (+0800) Subject: Bluetooth: btsdio: Use module_sdio_driver helper X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=afa8d3160add52e79c1d022ce22d20528d462910;p=openwrt%2Fstaging%2Fblogic.git Bluetooth: btsdio: 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. Signed-off-by: Sean Wang Acked-by: Ulf Hansson Signed-off-by: Marcel Holtmann --- diff --git a/drivers/bluetooth/btsdio.c b/drivers/bluetooth/btsdio.c index 282d1af1d3ba..4cfa9abe03c8 100644 --- a/drivers/bluetooth/btsdio.c +++ b/drivers/bluetooth/btsdio.c @@ -376,20 +376,7 @@ static struct sdio_driver btsdio_driver = { .id_table = btsdio_table, }; -static int __init btsdio_init(void) -{ - BT_INFO("Generic Bluetooth SDIO driver ver %s", VERSION); - - return sdio_register_driver(&btsdio_driver); -} - -static void __exit btsdio_exit(void) -{ - sdio_unregister_driver(&btsdio_driver); -} - -module_init(btsdio_init); -module_exit(btsdio_exit); +module_sdio_driver(btsdio_driver); MODULE_AUTHOR("Marcel Holtmann "); MODULE_DESCRIPTION("Generic Bluetooth SDIO driver ver " VERSION);