diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2016-12-01 18:38:20 +0530 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2017-01-12 16:47:31 +0200 |
commit | c0e6aa42682311611a7bfa40f7c8a91452eb030f (patch) | |
tree | f9826b636b1f4906f0986a55828f16df33e71058 /drivers/net/wireless/marvell/mwifiex/sdio.c | |
parent | 045f0c1b5e26818e28a401e623a581dfbd6b371e (diff) | |
download | linux-stable-c0e6aa42682311611a7bfa40f7c8a91452eb030f.tar.gz linux-stable-c0e6aa42682311611a7bfa40f7c8a91452eb030f.tar.bz2 linux-stable-c0e6aa42682311611a7bfa40f7c8a91452eb030f.zip |
mwifiex: use module_*_driver helper macros
After user_rmmod global flag removal, *_init_module() and
*_cleanup_module() have become just a wrapper functions.
We will get rid of them with the help of module_*_driver() macros.
For pcie, existing ".init_if" handler has same name as what
module_pcie_driver() macro will create. Let's rename it to
avoid conflict.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/sdio.c')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/sdio.c | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/sdio.c b/drivers/net/wireless/marvell/mwifiex/sdio.c index 0b6ed3fab085..44eb65acafdd 100644 --- a/drivers/net/wireless/marvell/mwifiex/sdio.c +++ b/drivers/net/wireless/marvell/mwifiex/sdio.c @@ -2704,34 +2704,7 @@ static struct mwifiex_if_ops sdio_ops = { .deaggr_pkt = mwifiex_deaggr_sdio_pkt, }; -/* - * This function initializes the SDIO driver. - * - * This registers the device with SDIO bus. - */ -static int -mwifiex_sdio_init_module(void) -{ - return sdio_register_driver(&mwifiex_sdio); -} - -/* - * This function cleans up the SDIO driver. - * - * The following major steps are followed for cleanup - - * - Resume the device if its suspended - * - Disconnect the device if connected - * - Shutdown the firmware - * - Unregister the device from SDIO bus. - */ -static void -mwifiex_sdio_cleanup_module(void) -{ - sdio_unregister_driver(&mwifiex_sdio); -} - -module_init(mwifiex_sdio_init_module); -module_exit(mwifiex_sdio_cleanup_module); +module_driver(mwifiex_sdio, sdio_register_driver, sdio_unregister_driver); MODULE_AUTHOR("Marvell International Ltd."); MODULE_DESCRIPTION("Marvell WiFi-Ex SDIO Driver version " SDIO_VERSION); |