| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* radio-cadet.c - A video4linux driver for the ADS Cadet AM/FM Radio Card |
|---|
| 2 | 3 | * |
|---|
| 3 | 4 | * by Fred Gleason <fredg@wava.com> |
|---|
| .. | .. |
|---|
| 353 | 354 | static int vidioc_querycap(struct file *file, void *priv, |
|---|
| 354 | 355 | struct v4l2_capability *v) |
|---|
| 355 | 356 | { |
|---|
| 356 | | - strlcpy(v->driver, "ADS Cadet", sizeof(v->driver)); |
|---|
| 357 | | - strlcpy(v->card, "ADS Cadet", sizeof(v->card)); |
|---|
| 358 | | - strlcpy(v->bus_info, "ISA:radio-cadet", sizeof(v->bus_info)); |
|---|
| 359 | | - v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO | |
|---|
| 360 | | - V4L2_CAP_READWRITE | V4L2_CAP_RDS_CAPTURE; |
|---|
| 361 | | - v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS; |
|---|
| 357 | + strscpy(v->driver, "ADS Cadet", sizeof(v->driver)); |
|---|
| 358 | + strscpy(v->card, "ADS Cadet", sizeof(v->card)); |
|---|
| 359 | + strscpy(v->bus_info, "ISA:radio-cadet", sizeof(v->bus_info)); |
|---|
| 362 | 360 | return 0; |
|---|
| 363 | 361 | } |
|---|
| 364 | 362 | |
|---|
| .. | .. |
|---|
| 370 | 368 | if (v->index) |
|---|
| 371 | 369 | return -EINVAL; |
|---|
| 372 | 370 | v->type = V4L2_TUNER_RADIO; |
|---|
| 373 | | - strlcpy(v->name, "Radio", sizeof(v->name)); |
|---|
| 371 | + strscpy(v->name, "Radio", sizeof(v->name)); |
|---|
| 374 | 372 | v->capability = bands[0].capability | bands[1].capability; |
|---|
| 375 | 373 | v->rangelow = bands[0].rangelow; /* 520 kHz (start of AM band) */ |
|---|
| 376 | 374 | v->rangehigh = bands[1].rangehigh; /* 108.0 MHz (end of FM band) */ |
|---|
| .. | .. |
|---|
| 595 | 593 | struct v4l2_ctrl_handler *hdl; |
|---|
| 596 | 594 | int res = -ENODEV; |
|---|
| 597 | 595 | |
|---|
| 598 | | - strlcpy(v4l2_dev->name, "cadet", sizeof(v4l2_dev->name)); |
|---|
| 596 | + strscpy(v4l2_dev->name, "cadet", sizeof(v4l2_dev->name)); |
|---|
| 599 | 597 | mutex_init(&dev->lock); |
|---|
| 600 | 598 | |
|---|
| 601 | 599 | /* If a probe was requested then probe ISAPnP first (safest) */ |
|---|
| .. | .. |
|---|
| 639 | 637 | dev->is_fm_band = true; |
|---|
| 640 | 638 | dev->curfreq = bands[dev->is_fm_band].rangelow; |
|---|
| 641 | 639 | cadet_setfreq(dev, dev->curfreq); |
|---|
| 642 | | - strlcpy(dev->vdev.name, v4l2_dev->name, sizeof(dev->vdev.name)); |
|---|
| 640 | + strscpy(dev->vdev.name, v4l2_dev->name, sizeof(dev->vdev.name)); |
|---|
| 643 | 641 | dev->vdev.v4l2_dev = v4l2_dev; |
|---|
| 644 | 642 | dev->vdev.fops = &cadet_fops; |
|---|
| 645 | 643 | dev->vdev.ioctl_ops = &cadet_ioctl_ops; |
|---|
| 646 | 644 | dev->vdev.release = video_device_release_empty; |
|---|
| 647 | 645 | dev->vdev.lock = &dev->lock; |
|---|
| 646 | + dev->vdev.device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO | |
|---|
| 647 | + V4L2_CAP_READWRITE | V4L2_CAP_RDS_CAPTURE; |
|---|
| 648 | 648 | video_set_drvdata(&dev->vdev, dev); |
|---|
| 649 | 649 | |
|---|
| 650 | 650 | res = video_register_device(&dev->vdev, VFL_TYPE_RADIO, radio_nr); |
|---|