atmel: 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 and remove .data field. 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-6-allen.cryptic@gmail.com
This commit is contained in:
parent
9ccac12996
commit
a36f50e5b9
|
@ -1199,7 +1199,6 @@ static void at76_rx_callback(struct urb *urb)
|
||||||
{
|
{
|
||||||
struct at76_priv *priv = urb->context;
|
struct at76_priv *priv = urb->context;
|
||||||
|
|
||||||
priv->rx_tasklet.data = (unsigned long)urb;
|
|
||||||
tasklet_schedule(&priv->rx_tasklet);
|
tasklet_schedule(&priv->rx_tasklet);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1545,10 +1544,10 @@ exit:
|
||||||
return ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
return ieee80211_channel_to_frequency(channel, NL80211_BAND_2GHZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void at76_rx_tasklet(unsigned long param)
|
static void at76_rx_tasklet(struct tasklet_struct *t)
|
||||||
{
|
{
|
||||||
struct urb *urb = (struct urb *)param;
|
struct at76_priv *priv = from_tasklet(priv, t, rx_tasklet);
|
||||||
struct at76_priv *priv = urb->context;
|
struct urb *urb = priv->rx_urb;
|
||||||
struct at76_rx_buffer *buf;
|
struct at76_rx_buffer *buf;
|
||||||
struct ieee80211_rx_status rx_status = { 0 };
|
struct ieee80211_rx_status rx_status = { 0 };
|
||||||
|
|
||||||
|
@ -2215,7 +2214,7 @@ static struct at76_priv *at76_alloc_new_device(struct usb_device *udev)
|
||||||
INIT_WORK(&priv->work_join_bssid, at76_work_join_bssid);
|
INIT_WORK(&priv->work_join_bssid, at76_work_join_bssid);
|
||||||
INIT_DELAYED_WORK(&priv->dwork_hw_scan, at76_dwork_hw_scan);
|
INIT_DELAYED_WORK(&priv->dwork_hw_scan, at76_dwork_hw_scan);
|
||||||
|
|
||||||
tasklet_init(&priv->rx_tasklet, at76_rx_tasklet, 0);
|
tasklet_setup(&priv->rx_tasklet, at76_rx_tasklet);
|
||||||
|
|
||||||
priv->pm_mode = AT76_PM_OFF;
|
priv->pm_mode = AT76_PM_OFF;
|
||||||
priv->pm_period = 0;
|
priv->pm_period = 0;
|
||||||
|
|
Loading…
Reference in New Issue