netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Allen Pais <allen.lkml@gmail.com>
To: kvalo@codeaurora.org
Cc: davem@davemloft.net, nbd@nbd.name, lorenzo.bianconi83@gmail.com,
	ryder.lee@mediatek.com, kuba@kernel.org, matthias.bgg@gmail.com,
	ath11k@lists.infradead.org, linux-mediatek@lists.infradead.org,
	linux-wireless@vger.kernel.org, netdev@vger.kernel.org,
	Allen Pais <apais@linux.microsoft.com>,
	Romain Perier <romain.perier@gmail.com>
Subject: [PATCH v2 2/3] wireless: mt7601u: convert tasklets to use new tasklet_setup() API
Date: Wed,  7 Oct 2020 16:03:08 +0530	[thread overview]
Message-ID: <20201007103309.363737-3-allen.lkml@gmail.com> (raw)
In-Reply-To: <20201007103309.363737-1-allen.lkml@gmail.com>

From: Allen Pais <apais@linux.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@gmail.com>
Signed-off-by: Allen Pais <apais@linux.microsoft.com>
---
 drivers/net/wireless/mediatek/mt7601u/dma.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt7601u/dma.c b/drivers/net/wireless/mediatek/mt7601u/dma.c
index 09f931d45..5f99054f5 100644
--- a/drivers/net/wireless/mediatek/mt7601u/dma.c
+++ b/drivers/net/wireless/mediatek/mt7601u/dma.c
@@ -212,9 +212,9 @@ static void mt7601u_complete_rx(struct urb *urb)
 	spin_unlock_irqrestore(&dev->rx_lock, flags);
 }
 
-static void mt7601u_rx_tasklet(unsigned long data)
+static void mt7601u_rx_tasklet(struct tasklet_struct *t)
 {
-	struct mt7601u_dev *dev = (struct mt7601u_dev *) data;
+	struct mt7601u_dev *dev = from_tasklet(dev, t, rx_tasklet);
 	struct mt7601u_dma_buf_rx *e;
 
 	while ((e = mt7601u_rx_get_pending_entry(dev))) {
@@ -266,9 +266,9 @@ static void mt7601u_complete_tx(struct urb *urb)
 	spin_unlock_irqrestore(&dev->tx_lock, flags);
 }
 
-static void mt7601u_tx_tasklet(unsigned long data)
+static void mt7601u_tx_tasklet(struct tasklet_struct *t)
 {
-	struct mt7601u_dev *dev = (struct mt7601u_dev *) data;
+	struct mt7601u_dev *dev = from_tasklet(dev, t, tx_tasklet);
 	struct sk_buff_head skbs;
 	unsigned long flags;
 
@@ -507,8 +507,8 @@ int mt7601u_dma_init(struct mt7601u_dev *dev)
 {
 	int ret = -ENOMEM;
 
-	tasklet_init(&dev->tx_tasklet, mt7601u_tx_tasklet, (unsigned long) dev);
-	tasklet_init(&dev->rx_tasklet, mt7601u_rx_tasklet, (unsigned long) dev);
+	tasklet_setup(&dev->tx_tasklet, mt7601u_tx_tasklet);
+	tasklet_setup(&dev->rx_tasklet, mt7601u_rx_tasklet);
 
 	ret = mt7601u_alloc_tx(dev);
 	if (ret)
-- 
2.25.1


  parent reply	other threads:[~2020-10-07 10:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 10:33 [PATCH v2 0/3] wireless: convert tasklets to use new Allen Pais
2020-10-07 10:33 ` [PATCH v2 1/3] wireless: mt76: convert tasklets to use new tasklet_setup() API Allen Pais
2020-10-07 10:33 ` Allen Pais [this message]
2020-11-07 11:29   ` [PATCH v2 2/3] wireless: mt7601u: " Kalle Valo
2020-10-07 10:33 ` [PATCH v2 3/3] ath11k: " Allen Pais
2020-11-07  7:59   ` Kalle Valo
2020-11-03  7:35 ` [PATCH v2 0/3] wireless: convert tasklets to use new Allen Pais
2020-11-04 16:38   ` Kalle Valo
2020-11-05  3:33     ` Allen Pais

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=20201007103309.363737-3-allen.lkml@gmail.com \
    --to=allen.lkml@gmail.com \
    --cc=apais@linux.microsoft.com \
    --cc=ath11k@lists.infradead.org \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=kvalo@codeaurora.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lorenzo.bianconi83@gmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=nbd@nbd.name \
    --cc=netdev@vger.kernel.org \
    --cc=romain.perier@gmail.com \
    --cc=ryder.lee@mediatek.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).