Commit 6027ff6b authored by Allen Pais's avatar Allen Pais Committed by Mauro Carvalho Chehab

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: default avatarRomain Perier <romain.perier@gmail.com>
Signed-off-by: default avatarAllen Pais <allen.lkml@gmail.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 4cf709c9
...@@ -50,9 +50,9 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); ...@@ -50,9 +50,9 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
/* nGene interrupt handler **************************************************/ /* 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) { while (dev->EventQueueReadIndex != dev->EventQueueWriteIndex) {
struct EVENT_BUFFER Event = struct EVENT_BUFFER Event =
...@@ -68,9 +68,9 @@ static void event_tasklet(unsigned long data) ...@@ -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 device *pdev = &chan->dev->pci_dev->dev;
struct SBufferHeader *Cur = chan->nextBuffer; struct SBufferHeader *Cur = chan->nextBuffer;
...@@ -1181,7 +1181,7 @@ static void ngene_init(struct ngene *dev) ...@@ -1181,7 +1181,7 @@ static void ngene_init(struct ngene *dev)
struct device *pdev = &dev->pci_dev->dev; struct device *pdev = &dev->pci_dev->dev;
int i; 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 + 0xc000, 0x00, 0x220);
memset_io(dev->iomem + 0xc400, 0x00, 0x100); memset_io(dev->iomem + 0xc400, 0x00, 0x100);
...@@ -1445,7 +1445,7 @@ static int init_channel(struct ngene_channel *chan) ...@@ -1445,7 +1445,7 @@ static int init_channel(struct ngene_channel *chan)
struct ngene_info *ni = dev->card_info; struct ngene_info *ni = dev->card_info;
int io = ni->io_type[nr]; 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->users = 0;
chan->type = io; chan->type = io;
chan->mode = chan->type; /* for now only one mode */ chan->mode = chan->type; /* for now only one mode */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment