forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
kernel/drivers/media/pci/ivtv/ivtv-cards.c
....@@ -1,21 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 Functions to query card hardware
34 Copyright (C) 2003-2004 Kevin Thayer <nufan_wfk at yahoo.com>
45 Copyright (C) 2005-2007 Hans Verkuil <hverkuil@xs4all.nl>
56
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
- You should have received a copy of the GNU General Public License
17
- along with this program; if not, write to the Free Software
18
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
197 */
208
219 #include "ivtv-driver.h"
....@@ -65,7 +53,7 @@
6553
6654 /********************** card configuration *******************************/
6755
68
-/* Please add new PCI IDs to: http://pci-ids.ucw.cz/
56
+/* Please add new PCI IDs to: https://pci-ids.ucw.cz/
6957 This keeps the PCI ID database up to date. Note that the entries
7058 must be added under vendor 0x4444 (Conexant) as subsystem IDs.
7159 New vendor IDs should still be added to the vendor ID list. */
....@@ -1317,8 +1305,8 @@
13171305 if (index >= itv->nof_inputs)
13181306 return -EINVAL;
13191307 input->index = index;
1320
- strlcpy(input->name, input_strs[card_input->video_type - 1],
1321
- sizeof(input->name));
1308
+ strscpy(input->name, input_strs[card_input->video_type - 1],
1309
+ sizeof(input->name));
13221310 input->type = (card_input->video_type == IVTV_CARD_INPUT_VID_TUNER ?
13231311 V4L2_INPUT_TYPE_TUNER : V4L2_INPUT_TYPE_CAMERA);
13241312 input->audioset = (1 << itv->nof_audio_inputs) - 1;
....@@ -1334,7 +1322,7 @@
13341322 if (index >= itv->card->nof_outputs)
13351323 return -EINVAL;
13361324 output->index = index;
1337
- strlcpy(output->name, card_output->name, sizeof(output->name));
1325
+ strscpy(output->name, card_output->name, sizeof(output->name));
13381326 output->type = V4L2_OUTPUT_TYPE_ANALOG;
13391327 output->audioset = 1;
13401328 output->std = V4L2_STD_ALL;
....@@ -1353,8 +1341,8 @@
13531341 memset(audio, 0, sizeof(*audio));
13541342 if (index >= itv->nof_audio_inputs)
13551343 return -EINVAL;
1356
- strlcpy(audio->name, input_strs[aud_input->audio_type - 1],
1357
- sizeof(audio->name));
1344
+ strscpy(audio->name, input_strs[aud_input->audio_type - 1],
1345
+ sizeof(audio->name));
13581346 audio->index = index;
13591347 audio->capability = V4L2_AUDCAP_STEREO;
13601348 return 0;
....@@ -1365,6 +1353,6 @@
13651353 memset(aud_output, 0, sizeof(*aud_output));
13661354 if (itv->card->video_outputs == NULL || index != 0)
13671355 return -EINVAL;
1368
- strlcpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));
1356
+ strscpy(aud_output->name, "A/V Audio Out", sizeof(aud_output->name));
13691357 return 0;
13701358 }