Skip to content

Commit

Permalink
wireless: mt7601u: convert tasklets to use new tasklet_setup() API
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Allen Pais <[email protected]>
Signed-off-by: Kalle Valo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
allenpais authored and Kalle Valo committed Nov 7, 2020
1 parent 3650b22 commit 7eae051
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/net/wireless/mediatek/mt7601u/dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,9 @@ static void mt7601u_complete_rx(struct urb *urb)
spin_unlock_irqrestore(&dev->rx_lock, flags);
}

static void mt7601u_rx_tasklet(unsigned long data)
static void mt7601u_rx_tasklet(struct tasklet_struct *t)
{
struct mt7601u_dev *dev = (struct mt7601u_dev *) data;
struct mt7601u_dev *dev = from_tasklet(dev, t, rx_tasklet);
struct mt7601u_dma_buf_rx *e;

while ((e = mt7601u_rx_get_pending_entry(dev))) {
Expand Down Expand Up @@ -266,9 +266,9 @@ static void mt7601u_complete_tx(struct urb *urb)
spin_unlock_irqrestore(&dev->tx_lock, flags);
}

static void mt7601u_tx_tasklet(unsigned long data)
static void mt7601u_tx_tasklet(struct tasklet_struct *t)
{
struct mt7601u_dev *dev = (struct mt7601u_dev *) data;
struct mt7601u_dev *dev = from_tasklet(dev, t, tx_tasklet);
struct sk_buff_head skbs;
unsigned long flags;

Expand Down Expand Up @@ -507,8 +507,8 @@ int mt7601u_dma_init(struct mt7601u_dev *dev)
{
int ret = -ENOMEM;

tasklet_init(&dev->tx_tasklet, mt7601u_tx_tasklet, (unsigned long) dev);
tasklet_init(&dev->rx_tasklet, mt7601u_rx_tasklet, (unsigned long) dev);
tasklet_setup(&dev->tx_tasklet, mt7601u_tx_tasklet);
tasklet_setup(&dev->rx_tasklet, mt7601u_rx_tasklet);

ret = mt7601u_alloc_tx(dev);
if (ret)
Expand Down

0 comments on commit 7eae051

Please sign in to comment.