hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/media/pci/dm1105/dm1105.c
....@@ -1,18 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * dm1105.c - driver for DVB cards based on SDMC DM1105 PCI chip
34 *
45 * Copyright (C) 2008 Igor M. Liplianin <liplianin@me.by>
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 #include <linux/i2c.h>
....@@ -21,7 +11,6 @@
2111 #include <linux/interrupt.h>
2212 #include <linux/kernel.h>
2313 #include <linux/module.h>
24
-#include <linux/proc_fs.h>
2514 #include <linux/pci.h>
2615 #include <linux/dma-mapping.h>
2716 #include <linux/slab.h>
....@@ -517,7 +506,7 @@
517506 msgs[i].buf[byte] = rc;
518507 }
519508 } else if ((msgs[i].buf[0] == 0xf7) && (msgs[i].addr == 0x55)) {
520
- /* prepaired for cx24116 firmware */
509
+ /* prepared for cx24116 firmware */
521510 /* Write in small blocks */
522511 len = msgs[i].len - 1;
523512 k = 1;
....@@ -1046,7 +1035,7 @@
10461035
10471036 /* i2c */
10481037 i2c_set_adapdata(&dev->i2c_adap, dev);
1049
- strcpy(dev->i2c_adap.name, DRIVER_NAME);
1038
+ strscpy(dev->i2c_adap.name, DRIVER_NAME, sizeof(dev->i2c_adap.name));
10501039 dev->i2c_adap.owner = THIS_MODULE;
10511040 dev->i2c_adap.dev.parent = &pdev->dev;
10521041 dev->i2c_adap.algo = &dm1105_algo;
....@@ -1057,7 +1046,8 @@
10571046 goto err_dm1105_hw_exit;
10581047
10591048 i2c_set_adapdata(&dev->i2c_bb_adap, dev);
1060
- strcpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME);
1049
+ strscpy(dev->i2c_bb_adap.name, DM1105_I2C_GPIO_NAME,
1050
+ sizeof(dev->i2c_bb_adap.name));
10611051 dev->i2c_bb_adap.owner = THIS_MODULE;
10621052 dev->i2c_bb_adap.dev.parent = &pdev->dev;
10631053 dev->i2c_bb_adap.algo_data = &dev->i2c_bit;
....@@ -1188,6 +1178,7 @@
11881178 struct dvb_demux *dvbdemux = &dev->demux;
11891179 struct dmx_demux *dmx = &dvbdemux->dmx;
11901180
1181
+ cancel_work_sync(&dev->ir.work);
11911182 dm1105_ir_exit(dev);
11921183 dmx->close(dmx);
11931184 dvb_net_release(&dev->dvbnet);