| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Miro PCM20 radio driver for Linux radio support |
|---|
| 3 | 4 | * (c) 1998 Ruurd Reitsma <R.A.Reitsma@wbmt.tudelft.nl> |
|---|
| .. | .. |
|---|
| 200 | 201 | { |
|---|
| 201 | 202 | struct pcm20 *dev = video_drvdata(file); |
|---|
| 202 | 203 | |
|---|
| 203 | | - strlcpy(v->driver, "Miro PCM20", sizeof(v->driver)); |
|---|
| 204 | | - strlcpy(v->card, "Miro PCM20", sizeof(v->card)); |
|---|
| 204 | + strscpy(v->driver, "Miro PCM20", sizeof(v->driver)); |
|---|
| 205 | + strscpy(v->card, "Miro PCM20", sizeof(v->card)); |
|---|
| 205 | 206 | snprintf(v->bus_info, sizeof(v->bus_info), "ISA:%s", dev->v4l2_dev.name); |
|---|
| 206 | | - v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_RDS_CAPTURE; |
|---|
| 207 | | - v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS; |
|---|
| 208 | 207 | return 0; |
|---|
| 209 | 208 | } |
|---|
| 210 | 209 | |
|---|
| .. | .. |
|---|
| 231 | 230 | |
|---|
| 232 | 231 | if (v->index) |
|---|
| 233 | 232 | return -EINVAL; |
|---|
| 234 | | - strlcpy(v->name, "FM", sizeof(v->name)); |
|---|
| 233 | + strscpy(v->name, "FM", sizeof(v->name)); |
|---|
| 235 | 234 | v->type = V4L2_TUNER_RADIO; |
|---|
| 236 | 235 | v->rangelow = 87*16000; |
|---|
| 237 | 236 | v->rangehigh = 108*16000; |
|---|
| .. | .. |
|---|
| 443 | 442 | "you must load the snd-miro driver first!\n"); |
|---|
| 444 | 443 | return -ENODEV; |
|---|
| 445 | 444 | } |
|---|
| 446 | | - strlcpy(v4l2_dev->name, "radio-miropcm20", sizeof(v4l2_dev->name)); |
|---|
| 445 | + strscpy(v4l2_dev->name, "radio-miropcm20", sizeof(v4l2_dev->name)); |
|---|
| 447 | 446 | mutex_init(&dev->lock); |
|---|
| 448 | 447 | |
|---|
| 449 | 448 | res = v4l2_device_register(NULL, v4l2_dev); |
|---|
| .. | .. |
|---|
| 474 | 473 | v4l2_err(v4l2_dev, "Could not register control\n"); |
|---|
| 475 | 474 | goto err_hdl; |
|---|
| 476 | 475 | } |
|---|
| 477 | | - strlcpy(dev->vdev.name, v4l2_dev->name, sizeof(dev->vdev.name)); |
|---|
| 476 | + strscpy(dev->vdev.name, v4l2_dev->name, sizeof(dev->vdev.name)); |
|---|
| 478 | 477 | dev->vdev.v4l2_dev = v4l2_dev; |
|---|
| 479 | 478 | dev->vdev.fops = &pcm20_fops; |
|---|
| 480 | 479 | dev->vdev.ioctl_ops = &pcm20_ioctl_ops; |
|---|
| 481 | 480 | dev->vdev.release = video_device_release_empty; |
|---|
| 482 | 481 | dev->vdev.lock = &dev->lock; |
|---|
| 482 | + dev->vdev.device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO | |
|---|
| 483 | + V4L2_CAP_RDS_CAPTURE; |
|---|
| 483 | 484 | video_set_drvdata(&dev->vdev, dev); |
|---|
| 484 | 485 | snd_aci_cmd(dev->aci, ACI_SET_TUNERMONO, |
|---|
| 485 | 486 | dev->audmode == V4L2_TUNER_MODE_MONO, -1); |
|---|