| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * drivers/media/radio/si4713-i2c.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright (c) 2009 Nokia Corporation |
|---|
| 7 | 8 | * 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. |
|---|
| 18 | 9 | */ |
|---|
| 19 | 10 | |
|---|
| 20 | 11 | #include <linux/completion.h> |
|---|
| .. | .. |
|---|
| 1166 | 1157 | * V4L2_CID_TUNE_POWER_LEVEL. */ |
|---|
| 1167 | 1158 | if (force) |
|---|
| 1168 | 1159 | break; |
|---|
| 1169 | | - /* fall through */ |
|---|
| 1160 | + fallthrough; |
|---|
| 1170 | 1161 | case V4L2_CID_TUNE_POWER_LEVEL: |
|---|
| 1171 | 1162 | ret = si4713_tx_tune_power(sdev, |
|---|
| 1172 | 1163 | sdev->tune_pwr_level->val, sdev->tune_ant_cap->val); |
|---|
| .. | .. |
|---|
| 1272 | 1263 | if (vm->index > 0) |
|---|
| 1273 | 1264 | return -EINVAL; |
|---|
| 1274 | 1265 | |
|---|
| 1275 | | - strncpy(vm->name, "FM Modulator", 32); |
|---|
| 1266 | + strscpy(vm->name, "FM Modulator", sizeof(vm->name)); |
|---|
| 1276 | 1267 | vm->capability = V4L2_TUNER_CAP_STEREO | V4L2_TUNER_CAP_LOW | |
|---|
| 1277 | 1268 | V4L2_TUNER_CAP_RDS | V4L2_TUNER_CAP_RDS_CONTROLS; |
|---|
| 1278 | 1269 | |
|---|
| .. | .. |
|---|
| 1436 | 1427 | * I2C driver interface |
|---|
| 1437 | 1428 | */ |
|---|
| 1438 | 1429 | /* 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) |
|---|
| 1441 | 1431 | { |
|---|
| 1442 | 1432 | struct si4713_device *sdev; |
|---|
| 1443 | 1433 | struct v4l2_ctrl_handler *hdl; |
|---|
| .. | .. |
|---|
| 1669 | 1659 | .name = "si4713", |
|---|
| 1670 | 1660 | .of_match_table = of_match_ptr(si4713_of_match), |
|---|
| 1671 | 1661 | }, |
|---|
| 1672 | | - .probe = si4713_probe, |
|---|
| 1662 | + .probe_new = si4713_probe, |
|---|
| 1673 | 1663 | .remove = si4713_remove, |
|---|
| 1674 | 1664 | .id_table = si4713_id, |
|---|
| 1675 | 1665 | }; |
|---|