| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * driver/media/radio/radio-tea5764.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 8 | 9 | * Based in radio-tea5761.c Copyright (C) 2005 Nokia Corporation |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * Copyright (c) 2008 Fabio Belavenuto <belavenuto@gmail.com> |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 13 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 14 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 15 | | - * (at your option) any later version. |
|---|
| 16 | | - * |
|---|
| 17 | | - * This program is distributed in the hope that it will be useful, |
|---|
| 18 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 19 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 20 | | - * GNU General Public License for more details. |
|---|
| 21 | 12 | * |
|---|
| 22 | 13 | * History: |
|---|
| 23 | 14 | * 2008-12-06 Fabio Belavenuto <belavenuto@gmail.com> |
|---|
| .. | .. |
|---|
| 287 | 278 | struct tea5764_device *radio = video_drvdata(file); |
|---|
| 288 | 279 | struct video_device *dev = &radio->vdev; |
|---|
| 289 | 280 | |
|---|
| 290 | | - strlcpy(v->driver, dev->dev.driver->name, sizeof(v->driver)); |
|---|
| 291 | | - strlcpy(v->card, dev->name, sizeof(v->card)); |
|---|
| 281 | + strscpy(v->driver, dev->dev.driver->name, sizeof(v->driver)); |
|---|
| 282 | + strscpy(v->card, dev->name, sizeof(v->card)); |
|---|
| 292 | 283 | snprintf(v->bus_info, sizeof(v->bus_info), |
|---|
| 293 | 284 | "I2C:%s", dev_name(&dev->dev)); |
|---|
| 294 | | - v->device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; |
|---|
| 295 | | - v->capabilities = v->device_caps | V4L2_CAP_DEVICE_CAPS; |
|---|
| 296 | 285 | return 0; |
|---|
| 297 | 286 | } |
|---|
| 298 | 287 | |
|---|
| .. | .. |
|---|
| 305 | 294 | if (v->index > 0) |
|---|
| 306 | 295 | return -EINVAL; |
|---|
| 307 | 296 | |
|---|
| 308 | | - strlcpy(v->name, "FM", sizeof(v->name)); |
|---|
| 297 | + strscpy(v->name, "FM", sizeof(v->name)); |
|---|
| 309 | 298 | v->type = V4L2_TUNER_RADIO; |
|---|
| 310 | 299 | tea5764_i2c_read(radio); |
|---|
| 311 | 300 | v->rangelow = FREQ_MIN * FREQ_MUL; |
|---|
| .. | .. |
|---|
| 474 | 463 | video_set_drvdata(&radio->vdev, radio); |
|---|
| 475 | 464 | radio->vdev.lock = &radio->mutex; |
|---|
| 476 | 465 | radio->vdev.v4l2_dev = v4l2_dev; |
|---|
| 466 | + radio->vdev.device_caps = V4L2_CAP_TUNER | V4L2_CAP_RADIO; |
|---|
| 477 | 467 | |
|---|
| 478 | 468 | /* initialize and power off the chip */ |
|---|
| 479 | 469 | tea5764_i2c_read(radio); |
|---|