forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/drivers/media/usb/dvb-usb-v2/zd1301.c
....@@ -1,17 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * ZyDAS ZD1301 driver (USB interface)
34 *
45 * Copyright (C) 2015 Antti Palosaari <crope@iki.fi>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2 of the License, or
9
- * (at your option) any later version.
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.
156 */
167
178 #include "dvb_usb.h"
....@@ -177,12 +168,12 @@
177168 dev->mt2060_pdata.i2c_write_max = 9;
178169 dev->mt2060_pdata.dvb_frontend = frontend;
179170 memset(&board_info, 0, sizeof(board_info));
180
- strlcpy(board_info.type, "mt2060", I2C_NAME_SIZE);
171
+ strscpy(board_info.type, "mt2060", I2C_NAME_SIZE);
181172 board_info.addr = 0x60;
182173 board_info.platform_data = &dev->mt2060_pdata;
183174 request_module("%s", "mt2060");
184
- client = i2c_new_device(adapter, &board_info);
185
- if (!client || !client->dev.driver) {
175
+ client = i2c_new_client_device(adapter, &board_info);
176
+ if (!i2c_client_has_driver(client)) {
186177 ret = -ENODEV;
187178 goto err_module_put_demod;
188179 }