.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * budget-ci.c: driver for the SAA7146 based Budget DVB cards |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * partially based on the Siemens DVB driver by Ralph+Marcus Metzler |
---|
8 | 9 | * |
---|
9 | 10 | * CI interface support (c) 2004 Andrew de Quincey <adq_dvb@lidskialf.net> |
---|
10 | | - * |
---|
11 | | - * This program is free software; you can redistribute it and/or |
---|
12 | | - * modify it under the terms of the GNU General Public License |
---|
13 | | - * as published by the Free Software Foundation; either version 2 |
---|
14 | | - * of the License, or (at your option) any later version. |
---|
15 | | - * |
---|
16 | | - * |
---|
17 | | - * This program is distributed in the hope that it will be useful, |
---|
18 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
19 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
20 | | - * GNU General Public License for more details. |
---|
21 | | - * |
---|
22 | | - * To obtain the license, point your browser to |
---|
23 | | - * http://www.gnu.org/copyleft/gpl.html |
---|
24 | | - * |
---|
25 | 11 | * |
---|
26 | 12 | * the project's page is at https://linuxtv.org |
---|
27 | 13 | */ |
---|
.. | .. |
---|
113 | 99 | u8 tuner_pll_address; /* used for philips_tdm1316l configs */ |
---|
114 | 100 | }; |
---|
115 | 101 | |
---|
116 | | -static void msp430_ir_interrupt(unsigned long data) |
---|
| 102 | +static void msp430_ir_interrupt(struct tasklet_struct *t) |
---|
117 | 103 | { |
---|
118 | | - struct budget_ci *budget_ci = (struct budget_ci *) data; |
---|
| 104 | + struct budget_ci_ir *ir = from_tasklet(ir, t, msp430_irq_tasklet); |
---|
| 105 | + struct budget_ci *budget_ci = container_of(ir, typeof(*budget_ci), ir); |
---|
119 | 106 | struct rc_dev *dev = budget_ci->ir.dev; |
---|
120 | 107 | u32 command = ttpci_budget_debiread(&budget_ci->budget, DEBINOSWAP, DEBIADDR_IR, 2, 1, 0) >> 8; |
---|
121 | 108 | |
---|
.. | .. |
---|
243 | 230 | |
---|
244 | 231 | budget_ci->ir.dev = dev; |
---|
245 | 232 | |
---|
246 | | - tasklet_init(&budget_ci->ir.msp430_irq_tasklet, msp430_ir_interrupt, |
---|
247 | | - (unsigned long) budget_ci); |
---|
| 233 | + tasklet_setup(&budget_ci->ir.msp430_irq_tasklet, msp430_ir_interrupt); |
---|
248 | 234 | |
---|
249 | 235 | SAA7146_IER_ENABLE(saa, MASK_06); |
---|
250 | 236 | saa7146_setgpio(saa, 3, SAA7146_GPIO_IRQHI); |
---|
.. | .. |
---|
362 | 348 | return 0; |
---|
363 | 349 | } |
---|
364 | 350 | |
---|
365 | | -static void ciintf_interrupt(unsigned long data) |
---|
| 351 | +static void ciintf_interrupt(struct tasklet_struct *t) |
---|
366 | 352 | { |
---|
367 | | - struct budget_ci *budget_ci = (struct budget_ci *) data; |
---|
| 353 | + struct budget_ci *budget_ci = from_tasklet(budget_ci, t, |
---|
| 354 | + ciintf_irq_tasklet); |
---|
368 | 355 | struct saa7146_dev *saa = budget_ci->budget.dev; |
---|
369 | 356 | unsigned int flags; |
---|
370 | 357 | |
---|
.. | .. |
---|
505 | 492 | |
---|
506 | 493 | // Setup CI slot IRQ |
---|
507 | 494 | if (budget_ci->ci_irq) { |
---|
508 | | - tasklet_init(&budget_ci->ciintf_irq_tasklet, ciintf_interrupt, (unsigned long) budget_ci); |
---|
| 495 | + tasklet_setup(&budget_ci->ciintf_irq_tasklet, ciintf_interrupt); |
---|
509 | 496 | if (budget_ci->slot_status != SLOTSTATUS_NONE) { |
---|
510 | 497 | saa7146_setgpio(saa, 0, SAA7146_GPIO_IRQLO); |
---|
511 | 498 | } else { |
---|