forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
kernel/drivers/media/radio/si4713/si4713.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * drivers/media/radio/si4713-i2c.c
34 *
....@@ -5,16 +6,6 @@
56 *
67 * Copyright (c) 2009 Nokia Corporation
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/completion.h>
....@@ -1166,7 +1157,7 @@
11661157 * V4L2_CID_TUNE_POWER_LEVEL. */
11671158 if (force)
11681159 break;
1169
- /* fall through */
1160
+ fallthrough;
11701161 case V4L2_CID_TUNE_POWER_LEVEL:
11711162 ret = si4713_tx_tune_power(sdev,
11721163 sdev->tune_pwr_level->val, sdev->tune_ant_cap->val);
....@@ -1272,7 +1263,7 @@
12721263 if (vm->index > 0)
12731264 return -EINVAL;
12741265
1275
- strncpy(vm->name, "FM Modulator", 32);
1266
+ strscpy(vm->name, "FM Modulator", sizeof(vm->name));
12761267 vm->capability = V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_LOW |
12771268 V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_CONTROLS;
12781269
....@@ -1436,8 +1427,7 @@
14361427 * I2C driver interface
14371428 */
14381429 /* si4713_probe - probe for the device */
1439
-static int si4713_probe(struct i2c_client *client,
1440
- const struct i2c_device_id *id)
1430
+static int si4713_probe(struct i2c_client *client)
14411431 {
14421432 struct si4713_device *sdev;
14431433 struct v4l2_ctrl_handler *hdl;
....@@ -1669,7 +1659,7 @@
16691659 .name = "si4713",
16701660 .of_match_table = of_match_ptr(si4713_of_match),
16711661 },
1672
- .probe = si4713_probe,
1662
+ .probe_new = si4713_probe,
16731663 .remove = si4713_remove,
16741664 .id_table = si4713_id,
16751665 };