diff options
author | Allen Pais <allen.lkml@gmail.com> | 2020-08-17 12:06:29 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2020-08-27 16:22:06 +0300 |
commit | ae6cf59f80f7c002f8ed8035a822a0ea519a3297 (patch) | |
tree | 11ff191920a406265a0f554180d1000c74ddec94 /drivers/net/wireless/intel | |
parent | 427a06beb072be455c7b741667b1e8b326574ef0 (diff) | |
download | linux-ae6cf59f80f7c002f8ed8035a822a0ea519a3297.tar.xz |
ipw2x00: 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: Romain Perier <romain.perier@gmail.com>
Signed-off-by: Allen Pais <allen.lkml@gmail.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200817090637.26887-9-allen.cryptic@gmail.com
Diffstat (limited to 'drivers/net/wireless/intel')
-rw-r--r-- | drivers/net/wireless/intel/ipw2x00/ipw2100.c | 9 | ||||
-rw-r--r-- | drivers/net/wireless/intel/ipw2x00/ipw2200.c | 7 |
2 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2100.c b/drivers/net/wireless/intel/ipw2x00/ipw2100.c index 461e955aa259..b7fbfc77b612 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2100.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2100.c @@ -3204,9 +3204,9 @@ static void ipw2100_tx_send_data(struct ipw2100_priv *priv) } } -static void ipw2100_irq_tasklet(unsigned long data) +static void ipw2100_irq_tasklet(struct tasklet_struct *t) { - struct ipw2100_priv *priv = (struct ipw2100_priv *)data; + struct ipw2100_priv *priv = from_tasklet(priv, t, irq_tasklet); struct net_device *dev = priv->net_dev; unsigned long flags; u32 inta, tmp; @@ -6005,7 +6005,7 @@ static void ipw2100_rf_kill(struct work_struct *work) spin_unlock_irqrestore(&priv->low_lock, flags); } -static void ipw2100_irq_tasklet(unsigned long data); +static void ipw2100_irq_tasklet(struct tasklet_struct *t); static const struct net_device_ops ipw2100_netdev_ops = { .ndo_open = ipw2100_open, @@ -6135,8 +6135,7 @@ static struct net_device *ipw2100_alloc_device(struct pci_dev *pci_dev, INIT_DELAYED_WORK(&priv->rf_kill, ipw2100_rf_kill); INIT_DELAYED_WORK(&priv->scan_event, ipw2100_scan_event); - tasklet_init(&priv->irq_tasklet, - ipw2100_irq_tasklet, (unsigned long)priv); + tasklet_setup(&priv->irq_tasklet, ipw2100_irq_tasklet); /* NOTE: We do not start the deferred work for status checks yet */ priv->stop_rf_kill = 1; diff --git a/drivers/net/wireless/intel/ipw2x00/ipw2200.c b/drivers/net/wireless/intel/ipw2x00/ipw2200.c index e7680702e160..ada6ce32c1f1 100644 --- a/drivers/net/wireless/intel/ipw2x00/ipw2200.c +++ b/drivers/net/wireless/intel/ipw2x00/ipw2200.c @@ -1945,9 +1945,9 @@ static void notify_wx_assoc_event(struct ipw_priv *priv) wireless_send_event(priv->net_dev, SIOCGIWAP, &wrqu, NULL); } -static void ipw_irq_tasklet(unsigned long data) +static void ipw_irq_tasklet(struct tasklet_struct *t) { - struct ipw_priv *priv = (struct ipw_priv *)data; + struct ipw_priv *priv = from_tasklet(priv, t, irq_tasklet); u32 inta, inta_mask, handled = 0; unsigned long flags; @@ -10672,8 +10672,7 @@ static void ipw_setup_deferred_work(struct ipw_priv *priv) INIT_WORK(&priv->qos_activate, ipw_bg_qos_activate); #endif /* CONFIG_IPW2200_QOS */ - tasklet_init(&priv->irq_tasklet, - ipw_irq_tasklet, (unsigned long)priv); + tasklet_setup(&priv->irq_tasklet, ipw_irq_tasklet); } static void shim__set_security(struct net_device *dev, |