diff options
author | Allen Pais <allen.lkml@gmail.com> | 2020-08-17 11:31:47 +0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2020-08-29 09:12:30 +0300 |
commit | 32e36ef692a2e2f07ce30c7dac0bd01c408cc17b (patch) | |
tree | 925901dca70a2c0a5bb7714b98f09d45e17d80ac /drivers/media/pci/ttpci/budget-ci.c | |
parent | 0852d052e86890622de7ee5863a281c4b27674bf (diff) | |
download | linux-32e36ef692a2e2f07ce30c7dac0bd01c408cc17b.tar.xz |
media: ttpci: 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/ttpci/budget-ci.c')
-rw-r--r-- | drivers/media/pci/ttpci/budget-ci.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/media/pci/ttpci/budget-ci.c b/drivers/media/pci/ttpci/budget-ci.c index 77b102b8a013..d59d18647371 100644 --- a/drivers/media/pci/ttpci/budget-ci.c +++ b/drivers/media/pci/ttpci/budget-ci.c @@ -99,9 +99,10 @@ struct budget_ci { u8 tuner_pll_address; /* used for philips_tdm1316l configs */ }; -static void msp430_ir_interrupt(unsigned long data) +static void msp430_ir_interrupt(struct tasklet_struct *t) { - struct budget_ci *budget_ci = (struct budget_ci *) data; + struct budget_ci_ir *ir = from_tasklet(ir, t, msp430_irq_tasklet); + struct budget_ci *budget_ci = container_of(ir, typeof(*budget_ci), ir); struct rc_dev *dev = budget_ci->ir.dev; u32 command = ttpci_budget_debiread(&budget_ci->budget, DEBINOSWAP, DEBIADDR_IR, 2, 1, 0) >> 8; @@ -229,8 +230,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci) budget_ci->ir.dev = dev; - tasklet_init(&budget_ci->ir.msp430_irq_tasklet, msp430_ir_interrupt, - (unsigned long) budget_ci); + tasklet_setup(&budget_ci->ir.msp430_irq_tasklet, msp430_ir_interrupt); SAA7146_IER_ENABLE(saa, MASK_06); saa7146_setgpio(saa, 3, SAA7146_GPIO_IRQHI); @@ -348,9 +348,10 @@ static int ciintf_slot_ts_enable(struct dvb_ca_en50221 *ca, int slot) return 0; } -static void ciintf_interrupt(unsigned long data) +static void ciintf_interrupt(struct tasklet_struct *t) { - struct budget_ci *budget_ci = (struct budget_ci *) data; + struct budget_ci *budget_ci = from_tasklet(budget_ci, t, + ciintf_irq_tasklet); struct saa7146_dev *saa = budget_ci->budget.dev; unsigned int flags; @@ -491,7 +492,7 @@ static int ciintf_init(struct budget_ci *budget_ci) // Setup CI slot IRQ if (budget_ci->ci_irq) { - tasklet_init(&budget_ci->ciintf_irq_tasklet, ciintf_interrupt, (unsigned long) budget_ci); + tasklet_setup(&budget_ci->ciintf_irq_tasklet, ciintf_interrupt); if (budget_ci->slot_status != SLOTSTATUS_NONE) { saa7146_setgpio(saa, 0, SAA7146_GPIO_IRQLO); } else { |