Commit 51c41aa9 authored by Allen Pais's avatar Allen Pais Committed by Kalle Valo

mwl8k: convert tasklets to use new tasklet_setup() API

In preparation for unconditionally passing the
struct tasklet_struct pointer to all tasklet
callbacks, switch to using the new tasklet_setup()
and from_tasklet() to pass the tasklet pointer explicitly.
Signed-off-by: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200817090637.26887-12-allen.cryptic@gmail.com
parent 7433c969
...@@ -4630,10 +4630,10 @@ static irqreturn_t mwl8k_interrupt(int irq, void *dev_id) ...@@ -4630,10 +4630,10 @@ static irqreturn_t mwl8k_interrupt(int irq, void *dev_id)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static void mwl8k_tx_poll(unsigned long data) static void mwl8k_tx_poll(struct tasklet_struct *t)
{ {
struct ieee80211_hw *hw = (struct ieee80211_hw *)data; struct mwl8k_priv *priv = from_tasklet(priv, t, poll_tx_task);
struct mwl8k_priv *priv = hw->priv; struct ieee80211_hw *hw = pci_get_drvdata(priv->pdev);
int limit; int limit;
int i; int i;
...@@ -4659,10 +4659,10 @@ static void mwl8k_tx_poll(unsigned long data) ...@@ -4659,10 +4659,10 @@ static void mwl8k_tx_poll(unsigned long data)
} }
} }
static void mwl8k_rx_poll(unsigned long data) static void mwl8k_rx_poll(struct tasklet_struct *t)
{ {
struct ieee80211_hw *hw = (struct ieee80211_hw *)data; struct mwl8k_priv *priv = from_tasklet(priv, t, poll_rx_task);
struct mwl8k_priv *priv = hw->priv; struct ieee80211_hw *hw = pci_get_drvdata(priv->pdev);
int limit; int limit;
limit = 32; limit = 32;
...@@ -6120,9 +6120,9 @@ static int mwl8k_firmware_load_success(struct mwl8k_priv *priv) ...@@ -6120,9 +6120,9 @@ static int mwl8k_firmware_load_success(struct mwl8k_priv *priv)
INIT_WORK(&priv->fw_reload, mwl8k_hw_restart_work); INIT_WORK(&priv->fw_reload, mwl8k_hw_restart_work);
/* TX reclaim and RX tasklets. */ /* TX reclaim and RX tasklets. */
tasklet_init(&priv->poll_tx_task, mwl8k_tx_poll, (unsigned long)hw); tasklet_setup(&priv->poll_tx_task, mwl8k_tx_poll);
tasklet_disable(&priv->poll_tx_task); tasklet_disable(&priv->poll_tx_task);
tasklet_init(&priv->poll_rx_task, mwl8k_rx_poll, (unsigned long)hw); tasklet_setup(&priv->poll_rx_task, mwl8k_rx_poll);
tasklet_disable(&priv->poll_rx_task); tasklet_disable(&priv->poll_rx_task);
/* Power management cookie */ /* Power management cookie */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment