.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2012 Hans Verkuil <hverkuil@xs4all.nl> |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify |
---|
5 | | - * it under the terms of the GNU General Public License as published by |
---|
6 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
7 | | - * (at your option) any later version. |
---|
8 | | - * |
---|
9 | | - * This program is distributed in the hope that it will be useful, |
---|
10 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
11 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
12 | | - * GNU General Public License for more details. |
---|
13 | 4 | */ |
---|
14 | 5 | |
---|
15 | 6 | /* kernel includes */ |
---|
.. | .. |
---|
174 | 165 | { |
---|
175 | 166 | struct keene_device *radio = video_drvdata(file); |
---|
176 | 167 | |
---|
177 | | - strlcpy(v->driver, "radio-keene", sizeof(v->driver)); |
---|
178 | | - strlcpy(v->card, "Keene FM Transmitter", sizeof(v->card)); |
---|
| 168 | + strscpy(v->driver, "radio-keene", sizeof(v->driver)); |
---|
| 169 | + strscpy(v->card, "Keene FM Transmitter", sizeof(v->card)); |
---|
179 | 170 | usb_make_path(radio->usbdev, v->bus_info, sizeof(v->bus_info)); |
---|
180 | | - v->device_caps = V4L2_CAP_RADIO | V4L2_CAP_MODULATOR; |
---|
181 | | - v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS; |
---|
182 | 171 | return 0; |
---|
183 | 172 | } |
---|
184 | 173 | |
---|
.. | .. |
---|
190 | 179 | if (v->index > 0) |
---|
191 | 180 | return -EINVAL; |
---|
192 | 181 | |
---|
193 | | - strlcpy(v->name, "FM", sizeof(v->name)); |
---|
| 182 | + strscpy(v->name, "FM", sizeof(v->name)); |
---|
194 | 183 | v->rangelow = FREQ_MIN * FREQ_MUL; |
---|
195 | 184 | v->rangehigh = FREQ_MAX * FREQ_MUL; |
---|
196 | 185 | v->txsubchans = radio->stereo ? V4L2_TUNER_SUB_STEREO : V4L2_TUNER_SUB_MONO; |
---|
.. | .. |
---|
362 | 351 | |
---|
363 | 352 | radio->v4l2_dev.ctrl_handler = hdl; |
---|
364 | 353 | radio->v4l2_dev.release = usb_keene_video_device_release; |
---|
365 | | - strlcpy(radio->vdev.name, radio->v4l2_dev.name, |
---|
| 354 | + strscpy(radio->vdev.name, radio->v4l2_dev.name, |
---|
366 | 355 | sizeof(radio->vdev.name)); |
---|
367 | 356 | radio->vdev.v4l2_dev = &radio->v4l2_dev; |
---|
368 | 357 | radio->vdev.fops = &usb_keene_fops; |
---|
.. | .. |
---|
370 | 359 | radio->vdev.lock = &radio->lock; |
---|
371 | 360 | radio->vdev.release = video_device_release_empty; |
---|
372 | 361 | radio->vdev.vfl_dir = VFL_DIR_TX; |
---|
| 362 | + radio->vdev.device_caps = V4L2_CAP_RADIO | V4L2_CAP_MODULATOR; |
---|
373 | 363 | |
---|
374 | 364 | radio->usbdev = interface_to_usbdev(intf); |
---|
375 | 365 | radio->intf = intf; |
---|