| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Bt8xx based DVB adapter driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2002,2003 Florian Schirmer <jolt@tuxbox.org> |
|---|
| 5 | | - * |
|---|
| 6 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 7 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 8 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 9 | | - * (at your option) any later version. |
|---|
| 10 | | - * |
|---|
| 11 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 14 | | - * GNU General Public License for more details. |
|---|
| 15 | | - * |
|---|
| 16 | 6 | */ |
|---|
| 17 | 7 | |
|---|
| 18 | 8 | #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt |
|---|
| .. | .. |
|---|
| 49 | 39 | |
|---|
| 50 | 40 | #define IF_FREQUENCYx6 217 /* 6 * 36.16666666667MHz */ |
|---|
| 51 | 41 | |
|---|
| 52 | | -static void dvb_bt8xx_task(unsigned long data) |
|---|
| 42 | +static void dvb_bt8xx_task(struct tasklet_struct *t) |
|---|
| 53 | 43 | { |
|---|
| 54 | | - struct dvb_bt8xx_card *card = (struct dvb_bt8xx_card *)data; |
|---|
| 44 | + struct bt878 *bt = from_tasklet(bt, t, tasklet); |
|---|
| 45 | + struct dvb_bt8xx_card *card = dev_get_drvdata(&bt->adapter->dev); |
|---|
| 55 | 46 | |
|---|
| 56 | 47 | dprintk("%d\n", card->bt->finished_block); |
|---|
| 57 | 48 | |
|---|
| .. | .. |
|---|
| 403 | 394 | .demod_init = advbt771_samsung_tdtc9251dh0_demod_init, |
|---|
| 404 | 395 | }; |
|---|
| 405 | 396 | |
|---|
| 406 | | -static struct dst_config dst_config = { |
|---|
| 397 | +static const struct dst_config dst_config = { |
|---|
| 407 | 398 | .demod_address = 0x55, |
|---|
| 408 | 399 | }; |
|---|
| 409 | 400 | |
|---|
| .. | .. |
|---|
| 787 | 778 | goto err_disconnect_frontend; |
|---|
| 788 | 779 | } |
|---|
| 789 | 780 | |
|---|
| 790 | | - tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card); |
|---|
| 781 | + tasklet_setup(&card->bt->tasklet, dvb_bt8xx_task); |
|---|
| 791 | 782 | |
|---|
| 792 | 783 | frontend_init(card, type); |
|---|
| 793 | 784 | |
|---|
| .. | .. |
|---|
| 819 | 810 | |
|---|
| 820 | 811 | mutex_init(&card->lock); |
|---|
| 821 | 812 | card->bttv_nr = sub->core->nr; |
|---|
| 822 | | - strlcpy(card->card_name, sub->core->v4l2_dev.name, sizeof(card->card_name)); |
|---|
| 813 | + strscpy(card->card_name, sub->core->v4l2_dev.name, |
|---|
| 814 | + sizeof(card->card_name)); |
|---|
| 823 | 815 | card->i2c_adapter = &sub->core->i2c_adap; |
|---|
| 824 | 816 | |
|---|
| 825 | 817 | switch(sub->core->type) { |
|---|