summaryrefslogtreecommitdiff
path: root/drivers/net/caif/caif_virtio.c
diff options
context:
space:
mode:
authorEmil Renner Berthing <kernel@esmil.dk>2021-01-31 02:47:23 +0300
committerJakub Kicinski <kuba@kernel.org>2021-02-03 02:51:17 +0300
commitca5ae9e44ece723317d21b00778bd0afcc3493db (patch)
treeeca25db184733ac203af63dbd584e7c3a616dc76 /drivers/net/caif/caif_virtio.c
parent5bb98b2cfc2bd995010e71ce3147bdbca4dce92a (diff)
downloadlinux-ca5ae9e44ece723317d21b00778bd0afcc3493db.tar.xz
caif_virtio: use new tasklet API
This converts the driver to use the new tasklet API introduced in commit 12cc923f1ccc ("tasklet: Introduce new initialization API") Signed-off-by: Emil Renner Berthing <kernel@esmil.dk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/caif/caif_virtio.c')
-rw-r--r--drivers/net/caif/caif_virtio.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/caif/caif_virtio.c b/drivers/net/caif/caif_virtio.c
index 47a6d62b7511..106f089eb2a8 100644
--- a/drivers/net/caif/caif_virtio.c
+++ b/drivers/net/caif/caif_virtio.c
@@ -598,9 +598,9 @@ err:
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);