.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | |
---|
3 | 4 | bttv-i2c.c -- all the i2c code is here |
---|
.. | .. |
---|
11 | 12 | (c) 2005 Mauro Carvalho Chehab <mchehab@kernel.org> |
---|
12 | 13 | - Multituner support and i2c address binding |
---|
13 | 14 | |
---|
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. |
---|
23 | | - |
---|
24 | | - You should have received a copy of the GNU General Public License |
---|
25 | | - along with this program; if not, write to the Free Software |
---|
26 | | - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
---|
27 | 15 | |
---|
28 | 16 | */ |
---|
29 | 17 | |
---|
.. | .. |
---|
347 | 335 | /* init + register i2c adapter */ |
---|
348 | 336 | int init_bttv_i2c(struct bttv *btv) |
---|
349 | 337 | { |
---|
350 | | - strlcpy(btv->i2c_client.name, "bttv internal", I2C_NAME_SIZE); |
---|
| 338 | + strscpy(btv->i2c_client.name, "bttv internal", I2C_NAME_SIZE); |
---|
351 | 339 | |
---|
352 | 340 | if (i2c_hw) |
---|
353 | 341 | btv->use_i2c_hw = 1; |
---|
354 | 342 | if (btv->use_i2c_hw) { |
---|
355 | 343 | /* bt878 */ |
---|
356 | | - strlcpy(btv->c.i2c_adap.name, "bt878", |
---|
| 344 | + strscpy(btv->c.i2c_adap.name, "bt878", |
---|
357 | 345 | sizeof(btv->c.i2c_adap.name)); |
---|
358 | 346 | btv->c.i2c_adap.algo = &bttv_algo; |
---|
359 | 347 | } else { |
---|
.. | .. |
---|
362 | 350 | if (i2c_udelay<5) |
---|
363 | 351 | i2c_udelay=5; |
---|
364 | 352 | |
---|
365 | | - strlcpy(btv->c.i2c_adap.name, "bttv", |
---|
| 353 | + strscpy(btv->c.i2c_adap.name, "bttv", |
---|
366 | 354 | sizeof(btv->c.i2c_adap.name)); |
---|
367 | 355 | btv->i2c_algo = bttv_i2c_algo_bit_template; |
---|
368 | 356 | btv->i2c_algo.udelay = i2c_udelay; |
---|