| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * ZyDAS ZD1301 driver (USB interface) |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * 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. |
|---|
| 15 | 6 | */ |
|---|
| 16 | 7 | |
|---|
| 17 | 8 | #include "dvb_usb.h" |
|---|
| .. | .. |
|---|
| 177 | 168 | dev->mt2060_pdata.i2c_write_max = 9; |
|---|
| 178 | 169 | dev->mt2060_pdata.dvb_frontend = frontend; |
|---|
| 179 | 170 | 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); |
|---|
| 181 | 172 | board_info.addr = 0x60; |
|---|
| 182 | 173 | board_info.platform_data = &dev->mt2060_pdata; |
|---|
| 183 | 174 | 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)) { |
|---|
| 186 | 177 | ret = -ENODEV; |
|---|
| 187 | 178 | goto err_module_put_demod; |
|---|
| 188 | 179 | } |
|---|