| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * A driver for the AverMedia MR 800 USB FM radio. This device plugs |
|---|
| 3 | 4 | * into both the USB and an analog audio input, so this thing |
|---|
| .. | .. |
|---|
| 5 | 6 | * audio data has to be handled by a sound driver. |
|---|
| 6 | 7 | * |
|---|
| 7 | 8 | * Copyright (c) 2008 Alexey Klimov <klimov.linux@gmail.com> |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 11 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 12 | | - * (at your option) any later version. |
|---|
| 13 | | - * |
|---|
| 14 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 15 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 16 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 17 | | - * GNU General Public License for more details. |
|---|
| 18 | 9 | */ |
|---|
| 19 | 10 | |
|---|
| 20 | 11 | /* |
|---|
| .. | .. |
|---|
| 266 | 257 | { |
|---|
| 267 | 258 | struct amradio_device *radio = video_drvdata(file); |
|---|
| 268 | 259 | |
|---|
| 269 | | - strlcpy(v->driver, "radio-mr800", sizeof(v->driver)); |
|---|
| 270 | | - strlcpy(v->card, "AverMedia MR 800 USB FM Radio", sizeof(v->card)); |
|---|
| 260 | + strscpy(v->driver, "radio-mr800", sizeof(v->driver)); |
|---|
| 261 | + strscpy(v->card, "AverMedia MR 800 USB FM Radio", sizeof(v->card)); |
|---|
| 271 | 262 | usb_make_path(radio->usbdev, v->bus_info, sizeof(v->bus_info)); |
|---|
| 272 | | - v->device_caps = V4L2_CAP_RADIO | V4L2_CAP_TUNER | |
|---|
| 273 | | - V4L2_CAP_HW_FREQ_SEEK; |
|---|
| 274 | | - v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS; |
|---|
| 275 | 263 | return 0; |
|---|
| 276 | 264 | } |
|---|
| 277 | 265 | |
|---|
| .. | .. |
|---|
| 291 | 279 | if (retval) |
|---|
| 292 | 280 | return retval; |
|---|
| 293 | 281 | |
|---|
| 294 | | - strcpy(v->name, "FM"); |
|---|
| 282 | + strscpy(v->name, "FM", sizeof(v->name)); |
|---|
| 295 | 283 | v->type = V4L2_TUNER_RADIO; |
|---|
| 296 | 284 | v->rangelow = FREQ_MIN * FREQ_MUL; |
|---|
| 297 | 285 | v->rangehigh = FREQ_MAX * FREQ_MUL; |
|---|
| .. | .. |
|---|
| 547 | 535 | |
|---|
| 548 | 536 | radio->v4l2_dev.ctrl_handler = &radio->hdl; |
|---|
| 549 | 537 | radio->v4l2_dev.release = usb_amradio_release; |
|---|
| 550 | | - strlcpy(radio->vdev.name, radio->v4l2_dev.name, |
|---|
| 538 | + strscpy(radio->vdev.name, radio->v4l2_dev.name, |
|---|
| 551 | 539 | sizeof(radio->vdev.name)); |
|---|
| 552 | 540 | radio->vdev.v4l2_dev = &radio->v4l2_dev; |
|---|
| 553 | 541 | radio->vdev.fops = &usb_amradio_fops; |
|---|
| 554 | 542 | radio->vdev.ioctl_ops = &usb_amradio_ioctl_ops; |
|---|
| 555 | 543 | radio->vdev.release = video_device_release_empty; |
|---|
| 556 | 544 | radio->vdev.lock = &radio->lock; |
|---|
| 545 | + radio->vdev.device_caps = V4L2_CAP_RADIO | V4L2_CAP_TUNER | |
|---|
| 546 | + V4L2_CAP_HW_FREQ_SEEK; |
|---|
| 557 | 547 | |
|---|
| 558 | 548 | radio->usbdev = interface_to_usbdev(intf); |
|---|
| 559 | 549 | radio->intf = intf; |
|---|