linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Emil Renner Berthing <kernel@esmil.dk>
To: netdev@vger.kernel.org, linux-usb@vger.kernel.org,
	linux-ppp@vger.kernel.org
Cc: Emil Renner Berthing <kernel@esmil.dk>,
	Michael Grzeschik <m.grzeschik@pengutronix.de>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	Paul Mackerras <paulus@samba.org>,
	Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com,
	Petko Manolov <petkan@nucleusys.com>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>,
	Jing Xiangfeng <jingxiangfeng@huawei.com>,
	Oliver Neukum <oneukum@suse.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH 2/9] caif_virtio: use new tasklet API
Date: Sat, 30 Jan 2021 23:47:23 +0000	[thread overview]
Message-ID: <20210130234730.26565-3-kernel@esmil.dk> (raw)
In-Reply-To: <20210130234730.26565-1-kernel@esmil.dk>

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>
---
 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 47a6d62b7511..106f089eb2a8 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.30.0

  parent reply	other threads:[~2021-01-30 23:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-30 23:47 [PATCH 0/9] drivers: net: update tasklet_init callers Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 1/9] arcnet: use new tasklet API Emil Renner Berthing
2021-01-30 23:47 ` Emil Renner Berthing [this message]
2021-01-30 23:47 ` [PATCH 3/9] ifb: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 4/9] ppp: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 5/9] net: usb: hso: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 6/9] net: usb: lan78xx: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 7/9] net: usb: pegasus: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 8/9] net: usb: r8152: " Emil Renner Berthing
2021-01-30 23:47 ` [PATCH 9/9] net: usb: rtl8150: " Emil Renner Berthing
2021-02-03  4:07 ` [PATCH 0/9] drivers: net: update tasklet_init callers Jakub Kicinski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210130234730.26565-3-kernel@esmil.dk \
    --to=kernel@esmil.dk \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=davem@davemloft.net \
    --cc=jingxiangfeng@huawei.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=luc.vanoostenryck@gmail.com \
    --cc=m.grzeschik@pengutronix.de \
    --cc=netdev@vger.kernel.org \
    --cc=oneukum@suse.com \
    --cc=paulus@samba.org \
    --cc=petkan@nucleusys.com \
    --cc=woojung.huh@microchip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).