.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* |
---|
2 | 3 | * Driver for the Texas Instruments WL1273 FM radio. |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2011 Nokia Corporation |
---|
5 | 6 | * Author: Matti J. Aaltonen <matti.j.aaltonen@nokia.com> |
---|
6 | | - * |
---|
7 | | - * This program is free software; you can redistribute it and/or |
---|
8 | | - * modify it under the terms of the GNU General Public License |
---|
9 | | - * version 2 as published by the Free Software Foundation. |
---|
10 | | - * |
---|
11 | | - * This program is distributed in the hope that it will be useful, |
---|
12 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
13 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
14 | | - * GNU General Public License for more details. |
---|
15 | 7 | */ |
---|
16 | 8 | |
---|
17 | 9 | #include <linux/delay.h> |
---|
.. | .. |
---|
1285 | 1277 | |
---|
1286 | 1278 | dev_dbg(radio->dev, "%s\n", __func__); |
---|
1287 | 1279 | |
---|
1288 | | - strlcpy(capability->driver, WL1273_FM_DRIVER_NAME, |
---|
| 1280 | + strscpy(capability->driver, WL1273_FM_DRIVER_NAME, |
---|
1289 | 1281 | sizeof(capability->driver)); |
---|
1290 | | - strlcpy(capability->card, "Texas Instruments Wl1273 FM Radio", |
---|
| 1282 | + strscpy(capability->card, "TI Wl1273 FM Radio", |
---|
1291 | 1283 | sizeof(capability->card)); |
---|
1292 | | - strlcpy(capability->bus_info, radio->bus_type, |
---|
| 1284 | + strscpy(capability->bus_info, radio->bus_type, |
---|
1293 | 1285 | sizeof(capability->bus_info)); |
---|
1294 | | - |
---|
1295 | | - capability->device_caps = V4L2_CAP_HW_FREQ_SEEK | |
---|
1296 | | - V4L2_CAP_TUNER | V4L2_CAP_RADIO | V4L2_CAP_AUDIO | |
---|
1297 | | - V4L2_CAP_RDS_CAPTURE | V4L2_CAP_MODULATOR | |
---|
1298 | | - V4L2_CAP_RDS_OUTPUT; |
---|
1299 | | - capability->capabilities = capability->device_caps | |
---|
1300 | | - V4L2_CAP_DEVICE_CAPS; |
---|
1301 | | - |
---|
1302 | 1286 | return 0; |
---|
1303 | 1287 | } |
---|
1304 | 1288 | |
---|
.. | .. |
---|
1487 | 1471 | if (audio->index > 1) |
---|
1488 | 1472 | return -EINVAL; |
---|
1489 | 1473 | |
---|
1490 | | - strlcpy(audio->name, "Radio", sizeof(audio->name)); |
---|
| 1474 | + strscpy(audio->name, "Radio", sizeof(audio->name)); |
---|
1491 | 1475 | audio->capability = V4L2_AUDCAP_STEREO; |
---|
1492 | 1476 | |
---|
1493 | 1477 | return 0; |
---|
.. | .. |
---|
1522 | 1506 | if (tuner->index > 0) |
---|
1523 | 1507 | return -EINVAL; |
---|
1524 | 1508 | |
---|
1525 | | - strlcpy(tuner->name, WL1273_FM_DRIVER_NAME, sizeof(tuner->name)); |
---|
| 1509 | + strscpy(tuner->name, WL1273_FM_DRIVER_NAME, sizeof(tuner->name)); |
---|
1526 | 1510 | tuner->type = V4L2_TUNER_RADIO; |
---|
1527 | 1511 | |
---|
1528 | 1512 | tuner->rangelow = WL1273_FREQ(WL1273_BAND_JAPAN_LOW); |
---|
.. | .. |
---|
1780 | 1764 | |
---|
1781 | 1765 | dev_dbg(radio->dev, "%s\n", __func__); |
---|
1782 | 1766 | |
---|
1783 | | - strlcpy(modulator->name, WL1273_FM_DRIVER_NAME, |
---|
| 1767 | + strscpy(modulator->name, WL1273_FM_DRIVER_NAME, |
---|
1784 | 1768 | sizeof(modulator->name)); |
---|
1785 | 1769 | |
---|
1786 | 1770 | modulator->rangelow = WL1273_FREQ(WL1273_BAND_JAPAN_LOW); |
---|
.. | .. |
---|
1987 | 1971 | .name = WL1273_FM_DRIVER_NAME, |
---|
1988 | 1972 | .release = wl1273_vdev_release, |
---|
1989 | 1973 | .vfl_dir = VFL_DIR_TX, |
---|
| 1974 | + .device_caps = V4L2_CAP_HW_FREQ_SEEK | V4L2_CAP_TUNER | |
---|
| 1975 | + V4L2_CAP_RADIO | V4L2_CAP_AUDIO | |
---|
| 1976 | + V4L2_CAP_RDS_CAPTURE | V4L2_CAP_MODULATOR | |
---|
| 1977 | + V4L2_CAP_RDS_OUTPUT, |
---|
1990 | 1978 | }; |
---|
1991 | 1979 | |
---|
1992 | 1980 | static int wl1273_fm_radio_remove(struct platform_device *pdev) |
---|