diff options
author | Allen Pais <allen.lkml@gmail.com> | 2020-08-17 10:31:45 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-08-29 08:11:47 +0200 |
commit | 6027ff6ba111f376f9ecfa88f5c081f2e28e1a2f (patch) | |
tree | abd5b8fadc5d2aaca99e77a90c0914ec1a6de4f4 /drivers/media/pci | |
parent | media: mantis: convert tasklets to use new tasklet_setup() API (diff) | |
download | linux-6027ff6ba111f376f9ecfa88f5c081f2e28e1a2f.tar.xz linux-6027ff6ba111f376f9ecfa88f5c081f2e28e1a2f.zip |
media: ngene: convert tasklets to use new tasklet_setup() API
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>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/ngene/ngene-core.c | 12 |
1 files 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 */ |