hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/radio/si4713/radio-platform-si4713.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * drivers/media/radio/radio-si4713.c
34 *
....@@ -5,16 +6,6 @@
56 *
67 * Copyright (c) 2008 Instituto Nokia de Tecnologia - INdT
78 * Contact: Eduardo Valentin <eduardo.valentin@nokia.com>
8
- *
9
- * This program is free software; you can redistribute it and/or modify
10
- * it under the terms of the GNU General Public License as published by
11
- * the Free Software Foundation; either version 2 of the License, or
12
- * (at your option) any later version.
13
- *
14
- * This program is distributed in the hope that it will be useful,
15
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- * GNU General Public License for more details.
189 */
1910
2011 #include <linux/kernel.h>
....@@ -67,14 +58,11 @@
6758 static int radio_si4713_querycap(struct file *file, void *priv,
6859 struct v4l2_capability *capability)
6960 {
70
- strlcpy(capability->driver, "radio-si4713", sizeof(capability->driver));
71
- strlcpy(capability->card, "Silicon Labs Si4713 Modulator",
61
+ strscpy(capability->driver, "radio-si4713", sizeof(capability->driver));
62
+ strscpy(capability->card, "Silicon Labs Si4713 Modulator",
7263 sizeof(capability->card));
73
- strlcpy(capability->bus_info, "platform:radio-si4713",
64
+ strscpy(capability->bus_info, "platform:radio-si4713",
7465 sizeof(capability->bus_info));
75
- capability->device_caps = V4L2_CAP_MODULATOR | V4L2_CAP_RDS_OUTPUT;
76
- capability->capabilities = capability->device_caps | V4L2_CAP_DEVICE_CAPS;
77
-
7866 return 0;
7967 }
8068
....@@ -184,6 +172,7 @@
184172 rsdev->radio_dev.ctrl_handler = sd->ctrl_handler;
185173 /* Serialize all access to the si4713 */
186174 rsdev->radio_dev.lock = &rsdev->lock;
175
+ rsdev->radio_dev.device_caps = V4L2_CAP_MODULATOR | V4L2_CAP_RDS_OUTPUT;
187176 video_set_drvdata(&rsdev->radio_dev, rsdev);
188177 if (video_register_device(&rsdev->radio_dev, VFL_TYPE_RADIO, radio_nr)) {
189178 dev_err(&pdev->dev, "Could not register video device.\n");