forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/pci/bt8xx/dvb-bt8xx.c
....@@ -1,18 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Bt8xx based DVB adapter driver
34 *
45 * 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
- *
166 */
177
188 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
....@@ -49,9 +39,10 @@
4939
5040 #define IF_FREQUENCYx6 217 /* 6 * 36.16666666667MHz */
5141
52
-static void dvb_bt8xx_task(unsigned long data)
42
+static void dvb_bt8xx_task(struct tasklet_struct *t)
5343 {
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);
5546
5647 dprintk("%d\n", card->bt->finished_block);
5748
....@@ -403,7 +394,7 @@
403394 .demod_init = advbt771_samsung_tdtc9251dh0_demod_init,
404395 };
405396
406
-static struct dst_config dst_config = {
397
+static const struct dst_config dst_config = {
407398 .demod_address = 0x55,
408399 };
409400
....@@ -787,7 +778,7 @@
787778 goto err_disconnect_frontend;
788779 }
789780
790
- tasklet_init(&card->bt->tasklet, dvb_bt8xx_task, (unsigned long) card);
781
+ tasklet_setup(&card->bt->tasklet, dvb_bt8xx_task);
791782
792783 frontend_init(card, type);
793784
....@@ -819,7 +810,8 @@
819810
820811 mutex_init(&card->lock);
821812 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));
823815 card->i2c_adapter = &sub->core->i2c_adap;
824816
825817 switch(sub->core->type) {