Skip to content

Commit

Permalink
net: nixge: 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 <romain.perier@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Allen Pais authored and David S. Miller committed Sep 14, 2020
1 parent 436b7d9 commit f246d12
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/net/ethernet/ni/nixge.c
Original file line number Diff line number Diff line change
Expand Up @@ -787,9 +787,9 @@ static irqreturn_t nixge_rx_irq(int irq, void *_ndev)
return IRQ_HANDLED;
}

static void nixge_dma_err_handler(unsigned long data)
static void nixge_dma_err_handler(struct tasklet_struct *t)
{
struct nixge_priv *lp = (struct nixge_priv *)data;
struct nixge_priv *lp = from_tasklet(lp, t, dma_err_tasklet);
struct nixge_hw_dma_bd *cur_p;
struct nixge_tx_skb *tx_skb;
u32 cr, i;
Expand Down Expand Up @@ -879,8 +879,7 @@ static int nixge_open(struct net_device *ndev)
phy_start(phy);

/* Enable tasklets for Axi DMA error handling */
tasklet_init(&priv->dma_err_tasklet, nixge_dma_err_handler,
(unsigned long)priv);
tasklet_setup(&priv->dma_err_tasklet, nixge_dma_err_handler);

napi_enable(&priv->napi);

Expand Down

0 comments on commit f246d12

Please sign in to comment.