.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * dm1105.c - driver for DVB cards based on SDMC DM1105 PCI chip |
---|
3 | 4 | * |
---|
4 | 5 | * 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 | | - * |
---|
16 | 6 | */ |
---|
17 | 7 | |
---|
18 | 8 | #include <linux/i2c.h> |
---|
.. | .. |
---|
21 | 11 | #include <linux/interrupt.h> |
---|
22 | 12 | #include <linux/kernel.h> |
---|
23 | 13 | #include <linux/module.h> |
---|
24 | | -#include <linux/proc_fs.h> |
---|
25 | 14 | #include <linux/pci.h> |
---|
26 | 15 | #include <linux/dma-mapping.h> |
---|
27 | 16 | #include <linux/slab.h> |
---|
.. | .. |
---|
517 | 506 | msgs[i].buf[byte] = rc; |
---|
518 | 507 | } |
---|
519 | 508 | } else if ((msgs[i].buf[0] == 0xf7) && (msgs[i].addr == 0x55)) { |
---|
520 | | - /* prepaired for cx24116 firmware */ |
---|
| 509 | + /* prepared for cx24116 firmware */ |
---|
521 | 510 | /* Write in small blocks */ |
---|
522 | 511 | len = msgs[i].len - 1; |
---|
523 | 512 | k = 1; |
---|
.. | .. |
---|
1046 | 1035 | |
---|
1047 | 1036 | /* i2c */ |
---|
1048 | 1037 | 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)); |
---|
1050 | 1039 | dev->i2c_adap.owner = THIS_MODULE; |
---|
1051 | 1040 | dev->i2c_adap.dev.parent = &pdev->dev; |
---|
1052 | 1041 | dev->i2c_adap.algo = &dm1105_algo; |
---|
.. | .. |
---|
1057 | 1046 | goto err_dm1105_hw_exit; |
---|
1058 | 1047 | |
---|
1059 | 1048 | 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)); |
---|
1061 | 1051 | dev->i2c_bb_adap.owner = THIS_MODULE; |
---|
1062 | 1052 | dev->i2c_bb_adap.dev.parent = &pdev->dev; |
---|
1063 | 1053 | dev->i2c_bb_adap.algo_data = &dev->i2c_bit; |
---|
.. | .. |
---|
1188 | 1178 | struct dvb_demux *dvbdemux = &dev->demux; |
---|
1189 | 1179 | struct dmx_demux *dmx = &dvbdemux->dmx; |
---|
1190 | 1180 | |
---|
| 1181 | + cancel_work_sync(&dev->ir.work); |
---|
1191 | 1182 | dm1105_ir_exit(dev); |
---|
1192 | 1183 | dmx->close(dmx); |
---|
1193 | 1184 | dvb_net_release(&dev->dvbnet); |
---|