| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * radio-timb.c Timberdale FPGA Radio driver |
|---|
| 3 | 4 | * Copyright (c) 2009 Intel Corporation |
|---|
| 4 | | - * |
|---|
| 5 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 6 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 7 | | - * published by the Free Software Foundation. |
|---|
| 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 | 5 | */ |
|---|
| 14 | 6 | |
|---|
| 15 | 7 | #include <linux/io.h> |
|---|
| .. | .. |
|---|
| 39 | 31 | static int timbradio_vidioc_querycap(struct file *file, void *priv, |
|---|
| 40 | 32 | struct v4l2_capability *v) |
|---|
| 41 | 33 | { |
|---|
| 42 | | - strlcpy(v->driver, DRIVER_NAME, sizeof(v->driver)); |
|---|
| 43 | | - strlcpy(v->card, "Timberdale Radio", sizeof(v->card)); |
|---|
| 34 | + strscpy(v->driver, DRIVER_NAME, sizeof(v->driver)); |
|---|
| 35 | + strscpy(v->card, "Timberdale Radio", sizeof(v->card)); |
|---|
| 44 | 36 | snprintf(v->bus_info, sizeof(v->bus_info), "platform:"DRIVER_NAME); |
|---|
| 45 | | - v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; |
|---|
| 46 | | - v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS; |
|---|
| 47 | 37 | return 0; |
|---|
| 48 | 38 | } |
|---|
| 49 | 39 | |
|---|
| .. | .. |
|---|
| 115 | 105 | tr->pdata = *pdata; |
|---|
| 116 | 106 | mutex_init(&tr->lock); |
|---|
| 117 | 107 | |
|---|
| 118 | | - strlcpy(tr->video_dev.name, "Timberdale Radio", |
|---|
| 108 | + strscpy(tr->video_dev.name, "Timberdale Radio", |
|---|
| 119 | 109 | sizeof(tr->video_dev.name)); |
|---|
| 120 | 110 | tr->video_dev.fops = &timbradio_fops; |
|---|
| 121 | 111 | tr->video_dev.ioctl_ops = &timbradio_ioctl_ops; |
|---|
| 122 | 112 | tr->video_dev.release = video_device_release_empty; |
|---|
| 123 | 113 | tr->video_dev.minor = -1; |
|---|
| 124 | 114 | tr->video_dev.lock = &tr->lock; |
|---|
| 115 | + tr->video_dev.device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; |
|---|
| 125 | 116 | |
|---|
| 126 | | - strlcpy(tr->v4l2_dev.name, DRIVER_NAME, sizeof(tr->v4l2_dev.name)); |
|---|
| 117 | + strscpy(tr->v4l2_dev.name, DRIVER_NAME, sizeof(tr->v4l2_dev.name)); |
|---|
| 127 | 118 | err = v4l2_device_register(NULL, &tr->v4l2_dev); |
|---|
| 128 | 119 | if (err) |
|---|
| 129 | 120 | goto err; |
|---|