From: Allen Pais <allen.lkml@gmail.com>
To: mchehab@kernel.org, maintainers@bluecherrydvr.com,
patrice.chotard@st.com
Cc: keescook@chromium.org, linux-media@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Allen Pais <allen.lkml@gmail.com>,
Romain Perier <romain.perier@gmail.com>
Subject: [PATCH 03/11] media: ngene: convert tasklets to use new tasklet_setup() API
Date: Mon, 17 Aug 2020 14:01:45 +0530 [thread overview]
Message-ID: <20200817083153.22218-4-allen.lkml@gmail.com> (raw)
In-Reply-To: <20200817083153.22218-1-allen.lkml@gmail.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 <allen.lkml@gmail.com>
---
drivers/media/pci/ngene/ngene-core.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/media/pci/ngene/ngene-core.c b/drivers/media/pci/ngene/ngene-core.c
index af15ca1c501b..f9f94f47d76b 100644
--- a/drivers/media/pci/ngene/ngene-core.c
+++ b/drivers/media/pci/ngene/ngene-core.c
@@ -50,9 +50,9 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
/* nGene interrupt handler **************************************************/
/****************************************************************************/
-static void event_tasklet(unsigned long data)
+static void event_tasklet(struct tasklet_struct *t)
{
- struct ngene *dev = (struct ngene *)data;
+ struct ngene *dev = from_tasklet(dev, t, event_tasklet);
while (dev->EventQueueReadIndex != dev->EventQueueWriteIndex) {
struct EVENT_BUFFER Event =
@@ -68,9 +68,9 @@ static void event_tasklet(unsigned long data)
}
}
-static void demux_tasklet(unsigned long data)
+static void demux_tasklet(struct tasklet_struct *t)
{
- struct ngene_channel *chan = (struct ngene_channel *)data;
+ struct ngene_channel *chan = from_tasklet(chan, t, demux_tasklet);
struct device *pdev = &chan->dev->pci_dev->dev;
struct SBufferHeader *Cur = chan->nextBuffer;
@@ -1181,7 +1181,7 @@ static void ngene_init(struct ngene *dev)
struct device *pdev = &dev->pci_dev->dev;
int i;
- tasklet_init(&dev->event_tasklet, event_tasklet, (unsigned long)dev);
+ tasklet_setup(&dev->event_tasklet, event_tasklet);
memset_io(dev->iomem + 0xc000, 0x00, 0x220);
memset_io(dev->iomem + 0xc400, 0x00, 0x100);
@@ -1445,7 +1445,7 @@ static int init_channel(struct ngene_channel *chan)
struct ngene_info *ni = dev->card_info;
int io = ni->io_type[nr];
- tasklet_init(&chan->demux_tasklet, demux_tasklet, (unsigned long)chan);
+ tasklet_setup(&chan->demux_tasklet, demux_tasklet);
chan->users = 0;
chan->type = io;
chan->mode = chan->type; /* for now only one mode */
--
2.17.1
next prev parent reply other threads:[~2020-08-17 8:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-17 8:31 [PATCH 00/11] media: convert tasklets to use new tasklet_setup() Allen Pais
2020-08-17 8:31 ` [PATCH 01/11] media: bt8xx: convert tasklets to use new tasklet_setup() API Allen Pais
2020-08-17 8:31 ` [PATCH 02/11] media: mantis: " Allen Pais
2020-08-17 8:31 ` Allen Pais [this message]
2020-08-17 8:31 ` [PATCH 04/11] media: smipcie: " Allen Pais
2020-08-17 8:31 ` [PATCH 05/11] media: ttpci: " Allen Pais
2020-08-17 8:31 ` [PATCH 06/11] media: tw5864: " Allen Pais
2020-08-17 8:31 ` [PATCH 07/11] media: marvell-ccic: " Allen Pais
2020-08-17 8:31 ` [PATCH 08/11] media: pxa_camera: " Allen Pais
2020-08-17 8:31 ` [PATCH 09/11] media: sti: " Allen Pais
2020-08-17 8:31 ` [PATCH 10/11] media/radio: wl128x: " Allen Pais
2020-08-17 8:31 ` [PATCH 11/11] media: ttusb-dec: " 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=20200817083153.22218-4-allen.lkml@gmail.com \
--to=allen.lkml@gmail.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=maintainers@bluecherrydvr.com \
--cc=mchehab@kernel.org \
--cc=patrice.chotard@st.com \
--cc=romain.perier@gmail.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
all inboxes | Powered by JetHome®