| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * budget-core.c: driver for the SAA7146 based Budget DVB cards |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 12 | 13 | * Michael Dreher <michael@5dot1.de>, |
|---|
| 13 | 14 | * Oliver Endriss <o.endriss@gmx.de>, |
|---|
| 14 | 15 | * Andreas 'randy' Weinberger |
|---|
| 15 | | - * |
|---|
| 16 | | - * This program is free software; you can redistribute it and/or |
|---|
| 17 | | - * modify it under the terms of the GNU General Public License |
|---|
| 18 | | - * as published by the Free Software Foundation; either version 2 |
|---|
| 19 | | - * of the License, or (at your option) any later version. |
|---|
| 20 | | - * |
|---|
| 21 | | - * |
|---|
| 22 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 23 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 24 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 25 | | - * GNU General Public License for more details. |
|---|
| 26 | | - * |
|---|
| 27 | | - * To obtain the license, point your browser to |
|---|
| 28 | | - * http://www.gnu.org/copyleft/gpl.html |
|---|
| 29 | | - * |
|---|
| 30 | 16 | * |
|---|
| 31 | 17 | * the project's page is at https://linuxtv.org |
|---|
| 32 | 18 | */ |
|---|
| .. | .. |
|---|
| 185 | 171 | return ret; |
|---|
| 186 | 172 | } |
|---|
| 187 | 173 | |
|---|
| 188 | | -static void vpeirq(unsigned long data) |
|---|
| 174 | +static void vpeirq(struct tasklet_struct *t) |
|---|
| 189 | 175 | { |
|---|
| 190 | | - struct budget *budget = (struct budget *) data; |
|---|
| 176 | + struct budget *budget = from_tasklet(budget, t, vpe_tasklet); |
|---|
| 191 | 177 | u8 *mem = (u8 *) (budget->grabbing); |
|---|
| 192 | 178 | u32 olddma = budget->ttbp; |
|---|
| 193 | 179 | u32 newdma = saa7146_read(budget->dev, PCI_VDP3); |
|---|
| .. | .. |
|---|
| 509 | 495 | if (bi->type != BUDGET_FS_ACTIVY) |
|---|
| 510 | 496 | saa7146_write(dev, GPIO_CTRL, 0x500000); /* GPIO 3 = 1 */ |
|---|
| 511 | 497 | |
|---|
| 512 | | - strlcpy(budget->i2c_adap.name, budget->card->name, sizeof(budget->i2c_adap.name)); |
|---|
| 498 | + strscpy(budget->i2c_adap.name, budget->card->name, |
|---|
| 499 | + sizeof(budget->i2c_adap.name)); |
|---|
| 513 | 500 | |
|---|
| 514 | 501 | saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); |
|---|
| 515 | | - strcpy(budget->i2c_adap.name, budget->card->name); |
|---|
| 502 | + strscpy(budget->i2c_adap.name, budget->card->name, |
|---|
| 503 | + sizeof(budget->i2c_adap.name)); |
|---|
| 516 | 504 | |
|---|
| 517 | 505 | if (i2c_add_adapter(&budget->i2c_adap) < 0) { |
|---|
| 518 | 506 | ret = -ENOMEM; |
|---|
| .. | .. |
|---|
| 531 | 519 | /* upload all */ |
|---|
| 532 | 520 | saa7146_write(dev, GPIO_CTRL, 0x000000); |
|---|
| 533 | 521 | |
|---|
| 534 | | - tasklet_init(&budget->vpe_tasklet, vpeirq, (unsigned long) budget); |
|---|
| 522 | + tasklet_setup(&budget->vpe_tasklet, vpeirq); |
|---|
| 535 | 523 | |
|---|
| 536 | 524 | /* frontend power on */ |
|---|
| 537 | 525 | if (bi->type != BUDGET_FS_ACTIVY) |
|---|