forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/pci/cx88/cx88-i2c.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12
23 /*
34 *
....@@ -7,19 +8,8 @@
78 * & Marcus Metzler (mocm@thp.uni-koeln.de)
89 * (c) 2002 Yurij Sysoev <yurij@naturesoft.net>
910 * (c) 1999-2003 Gerd Knorr <kraxel@bytesex.org>
10
- *
1111 * (c) 2005 Mauro Carvalho Chehab <mchehab@kernel.org>
1212 * - Multituner support and i2c address binding
13
- *
14
- * This program is free software; you can redistribute it and/or modify
15
- * it under the terms of the GNU General Public License as published by
16
- * the Free Software Foundation; either version 2 of the License, or
17
- * (at your option) any later version.
18
- *
19
- * This program is distributed in the hope that it will be useful,
20
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
21
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22
- * GNU General Public License for more details.
2313 */
2414
2515 #include "cx88.h"
....@@ -140,14 +130,14 @@
140130 core->i2c_algo = cx8800_i2c_algo_template;
141131
142132 core->i2c_adap.dev.parent = &pci->dev;
143
- strlcpy(core->i2c_adap.name, core->name, sizeof(core->i2c_adap.name));
133
+ strscpy(core->i2c_adap.name, core->name, sizeof(core->i2c_adap.name));
144134 core->i2c_adap.owner = THIS_MODULE;
145135 core->i2c_algo.udelay = i2c_udelay;
146136 core->i2c_algo.data = core;
147137 i2c_set_adapdata(&core->i2c_adap, &core->v4l2_dev);
148138 core->i2c_adap.algo_data = &core->i2c_algo;
149139 core->i2c_client.adapter = &core->i2c_adap;
150
- strlcpy(core->i2c_client.name, "cx88xx internal", I2C_NAME_SIZE);
140
+ strscpy(core->i2c_client.name, "cx88xx internal", I2C_NAME_SIZE);
151141
152142 cx8800_bit_setscl(core, 1);
153143 cx8800_bit_setsda(core, 1);