diff options
author | Amitkumar Karwar <akarwar@marvell.com> | 2014-06-20 06:38:54 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2014-06-25 21:32:46 +0200 |
commit | 088df424be7fe5706ea7c385638d23f6a68c6dd1 (patch) | |
tree | dd732f7f324117ae84ca07bb2a1c108e2e1c9714 /drivers/net/wireless/mwifiex | |
parent | mwifiex: use generic 'iface_work' workqueue for SDIO interface (diff) | |
download | linux-088df424be7fe5706ea7c385638d23f6a68c6dd1.tar.xz linux-088df424be7fe5706ea7c385638d23f6a68c6dd1.zip |
mwifiex: get rid of global pointer reset_host
As we can derive host pointer from adapter, maintaining
a global variable doesn't make sense.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r-- | drivers/net/wireless/mwifiex/sdio.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/net/wireless/mwifiex/sdio.c b/drivers/net/wireless/mwifiex/sdio.c index 2ae4dd754226..b34270d425f4 100644 --- a/drivers/net/wireless/mwifiex/sdio.c +++ b/drivers/net/wireless/mwifiex/sdio.c @@ -1916,10 +1916,10 @@ mwifiex_update_mp_end_port(struct mwifiex_adapter *adapter, u16 port) port, card->mp_data_port_mask); } -static struct mmc_host *reset_host; -static void mwifiex_sdio_card_reset_work(struct work_struct *work) +static void mwifiex_sdio_card_reset_work(struct mwifiex_adapter *adapter) { - struct mmc_host *target = reset_host; + struct sdio_mmc_card *card = adapter->card; + struct mmc_host *target = card->func->card->host; /* The actual reset operation must be run outside of driver thread. * This is because mmc_remove_host() will cause the device to be @@ -1943,20 +1943,17 @@ static void mwifiex_sdio_work(struct work_struct *work) if (test_and_clear_bit(MWIFIEX_IFACE_WORK_CARD_RESET, &adapter->iface_work_flags)) - mwifiex_sdio_card_reset_work(work); + mwifiex_sdio_card_reset_work(adapter); } /* This function resets the card */ static void mwifiex_sdio_card_reset(struct mwifiex_adapter *adapter) { - struct sdio_mmc_card *card = adapter->card; - if (test_bit(MWIFIEX_IFACE_WORK_CARD_RESET, &adapter->iface_work_flags)) return; set_bit(MWIFIEX_IFACE_WORK_CARD_RESET, &adapter->iface_work_flags); - reset_host = card->func->card->host; schedule_work(&adapter->iface_work); } |