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>
This commit is contained in:
parent
4cf709c9ab
commit
6027ff6ba1
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue