staging: rtl8192: 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 <apais@linux.microsoft.com>
Link: https://lore.kernel.org/r/20200916061939.57976-1-allen.lkml@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Allen Pais 2020-09-16 11:49:39 +05:30 committed by Greg Kroah-Hartman
parent 4560714395
commit e24eca1fff
2 changed files with 7 additions and 8 deletions

View File

@ -1687,9 +1687,9 @@ static short ieee80211_sta_ps_sleep(struct ieee80211_device *ieee, u32 *time_h,
return 1; return 1;
} }
static inline void ieee80211_sta_ps(unsigned long data) static inline void ieee80211_sta_ps(struct tasklet_struct *t)
{ {
struct ieee80211_device *ieee = (struct ieee80211_device *)data; struct ieee80211_device *ieee = from_tasklet(ieee, t, ps_task);
u32 th, tl; u32 th, tl;
short sleep; short sleep;
@ -2598,7 +2598,7 @@ void ieee80211_softmac_init(struct ieee80211_device *ieee)
spin_lock_init(&ieee->mgmt_tx_lock); spin_lock_init(&ieee->mgmt_tx_lock);
spin_lock_init(&ieee->beacon_lock); spin_lock_init(&ieee->beacon_lock);
tasklet_init(&ieee->ps_task, ieee80211_sta_ps, (unsigned long)ieee); tasklet_setup(&ieee->ps_task, ieee80211_sta_ps);
} }
void ieee80211_softmac_free(struct ieee80211_device *ieee) void ieee80211_softmac_free(struct ieee80211_device *ieee)

View File

@ -2193,7 +2193,7 @@ static void rtl8192_init_priv_lock(struct r8192_priv *priv)
static void rtl819x_watchdog_wqcallback(struct work_struct *work); static void rtl819x_watchdog_wqcallback(struct work_struct *work);
static void rtl8192_irq_rx_tasklet(unsigned long data); static void rtl8192_irq_rx_tasklet(struct tasklet_struct *t);
/* init tasklet and wait_queue here. only 2.6 above kernel is considered */ /* init tasklet and wait_queue here. only 2.6 above kernel is considered */
#define DRV_NAME "wlan0" #define DRV_NAME "wlan0"
static void rtl8192_init_priv_task(struct net_device *dev) static void rtl8192_init_priv_task(struct net_device *dev)
@ -2214,8 +2214,7 @@ static void rtl8192_init_priv_task(struct net_device *dev)
InitialGainOperateWorkItemCallBack); InitialGainOperateWorkItemCallBack);
INIT_WORK(&priv->qos_activate, rtl8192_qos_activate); INIT_WORK(&priv->qos_activate, rtl8192_qos_activate);
tasklet_init(&priv->irq_rx_tasklet, rtl8192_irq_rx_tasklet, tasklet_setup(&priv->irq_rx_tasklet, rtl8192_irq_rx_tasklet);
(unsigned long)priv);
} }
static void rtl8192_get_eeprom_size(struct net_device *dev) static void rtl8192_get_eeprom_size(struct net_device *dev)
@ -4647,9 +4646,9 @@ static void rtl8192_rx_cmd(struct sk_buff *skb)
} }
} }
static void rtl8192_irq_rx_tasklet(unsigned long data) static void rtl8192_irq_rx_tasklet(struct tasklet_struct *t)
{ {
struct r8192_priv *priv = (struct r8192_priv *)data; struct r8192_priv *priv = from_tasklet(priv, t, irq_rx_tasklet);
struct sk_buff *skb; struct sk_buff *skb;
struct rtl8192_rx_info *info; struct rtl8192_rx_info *info;