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 8/9] net: usb: r8152: use new tasklet API
Date: Sat, 30 Jan 2021 23:47:29 +0000	[thread overview]
Message-ID: <20210130234730.26565-9-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/usb/r8152.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
index 67cd6986634f..0d7d2938e21d 100644
--- a/drivers/net/usb/r8152.c
+++ b/drivers/net/usb/r8152.c
@@ -2393,11 +2393,9 @@ static void tx_bottom(struct r8152 *tp)
 	} while (res = 0);
 }
 
-static void bottom_half(unsigned long data)
+static void bottom_half(struct tasklet_struct *t)
 {
-	struct r8152 *tp;
-
-	tp = (struct r8152 *)data;
+	struct r8152 *tp = from_tasklet(tp, t, tx_tl);
 
 	if (test_bit(RTL8152_UNPLUG, &tp->flags))
 		return;
@@ -6714,7 +6712,7 @@ static int rtl8152_probe(struct usb_interface *intf,
 	mutex_init(&tp->control);
 	INIT_DELAYED_WORK(&tp->schedule, rtl_work_func_t);
 	INIT_DELAYED_WORK(&tp->hw_phy_work, rtl_hw_phy_work_func_t);
-	tasklet_init(&tp->tx_tl, bottom_half, (unsigned long)tp);
+	tasklet_setup(&tp->tx_tl, bottom_half);
 	tasklet_disable(&tp->tx_tl);
 
 	netdev->netdev_ops = &rtl8152_netdev_ops;
-- 
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 ` [PATCH 2/9] caif_virtio: " Emil Renner Berthing
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 ` Emil Renner Berthing [this message]
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-9-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 \
    --subject='Re: [PATCH 8/9] net: usb: r8152: use new tasklet API' \
    /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

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).