.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Support for LGDT3302 and LGDT3303 - VSB/QAM |
---|
3 | 4 | * |
---|
4 | 5 | * Copyright (C) 2005 Wilson Michaels <wilsonmichaels@earthlink.net> |
---|
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 | | - * |
---|
16 | 6 | */ |
---|
17 | 7 | |
---|
18 | 8 | /* |
---|
.. | .. |
---|
929 | 919 | struct i2c_board_info board_info = {}; |
---|
930 | 920 | struct lgdt330x_config config = *_config; |
---|
931 | 921 | |
---|
932 | | - strlcpy(board_info.type, "lgdt330x", sizeof(board_info.type)); |
---|
| 922 | + strscpy(board_info.type, "lgdt330x", sizeof(board_info.type)); |
---|
933 | 923 | board_info.addr = demod_address; |
---|
934 | 924 | board_info.platform_data = &config; |
---|
935 | | - client = i2c_new_device(i2c, &board_info); |
---|
936 | | - if (!client || !client->dev.driver) |
---|
| 925 | + client = i2c_new_client_device(i2c, &board_info); |
---|
| 926 | + if (!i2c_client_has_driver(client)) |
---|
937 | 927 | return NULL; |
---|
938 | 928 | |
---|
939 | 929 | return lgdt330x_get_dvb_frontend(client); |
---|
940 | 930 | } |
---|
941 | | -EXPORT_SYMBOL(lgdt330x_attach); |
---|
| 931 | +EXPORT_SYMBOL_GPL(lgdt330x_attach); |
---|
942 | 932 | |
---|
943 | 933 | static const struct dvb_frontend_ops lgdt3302_ops = { |
---|
944 | 934 | .delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B }, |
---|