[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200914073131.803374-4-allen.lkml@gmail.com>
Date: Mon, 14 Sep 2020 13:01:22 +0530
From: Allen Pais <allen.lkml@...il.com>
To: davem@...emloft.net
Cc: m.grzeschik@...gutronix.de, kuba@...nel.org, paulus@...ba.org,
oliver@...kum.org, woojung.huh@...rochip.com,
UNGLinuxDriver@...rochip.com, petkan@...leusys.com,
netdev@...r.kernel.org, linux-usb@...r.kernel.org,
linux-ppp@...r.kernel.org, Allen Pais <apais@...ux.microsoft.com>,
Romain Perier <romain.perier@...il.com>
Subject: [RESEND net-next v2 03/12] net: caif: convert tasklets to use new tasklet_setup() API
From: Allen Pais <apais@...ux.microsoft.com>
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@...il.com>
Signed-off-by: Allen Pais <apais@...ux.microsoft.com>
---
drivers/net/caif/caif_virtio.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index 80ea2e913c2b..23c2eb8ceeec 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -598,9 +598,9 @@ static netdev_tx_t cfv_netdev_tx(struct sk_buff *skb, struct net_device *netdev)
return NETDEV_TX_OK;
}
-static void cfv_tx_release_tasklet(unsigned long drv)
+static void cfv_tx_release_tasklet(struct tasklet_struct *t)
{
- struct cfv_info *cfv = (struct cfv_info *)drv;
+ struct cfv_info *cfv = from_tasklet(cfv, t, tx_release_tasklet);
cfv_release_used_buf(cfv->vq_tx);
}
@@ -716,9 +716,7 @@ static int cfv_probe(struct virtio_device *vdev)
cfv->ctx.head = USHRT_MAX;
netif_napi_add(netdev, &cfv->napi, cfv_rx_poll, CFV_DEFAULT_QUOTA);
- tasklet_init(&cfv->tx_release_tasklet,
- cfv_tx_release_tasklet,
- (unsigned long)cfv);
+ tasklet_setup(&cfv->tx_release_tasklet, cfv_tx_release_tasklet);
/* Carrier is off until netdevice is opened */
netif_carrier_off(netdev);
--
2.25.1
Powered by blists - more mailing lists