Commit 436b7d95 authored by Allen Pais's avatar Allen Pais Committed by David S. Miller

nfp: 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: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <apais@linux.microsoft.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 54e977f0
...@@ -2287,9 +2287,9 @@ static bool nfp_ctrl_rx(struct nfp_net_r_vector *r_vec) ...@@ -2287,9 +2287,9 @@ static bool nfp_ctrl_rx(struct nfp_net_r_vector *r_vec)
return budget; return budget;
} }
static void nfp_ctrl_poll(unsigned long arg) static void nfp_ctrl_poll(struct tasklet_struct *t)
{ {
struct nfp_net_r_vector *r_vec = (void *)arg; struct nfp_net_r_vector *r_vec = from_tasklet(r_vec, t, tasklet);
spin_lock(&r_vec->lock); spin_lock(&r_vec->lock);
nfp_net_tx_complete(r_vec->tx_ring, 0); nfp_net_tx_complete(r_vec->tx_ring, 0);
...@@ -2337,8 +2337,7 @@ static void nfp_net_vecs_init(struct nfp_net *nn) ...@@ -2337,8 +2337,7 @@ static void nfp_net_vecs_init(struct nfp_net *nn)
__skb_queue_head_init(&r_vec->queue); __skb_queue_head_init(&r_vec->queue);
spin_lock_init(&r_vec->lock); spin_lock_init(&r_vec->lock);
tasklet_init(&r_vec->tasklet, nfp_ctrl_poll, tasklet_setup(&r_vec->tasklet, nfp_ctrl_poll);
(unsigned long)r_vec);
tasklet_disable(&r_vec->tasklet); tasklet_disable(&r_vec->tasklet);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment