hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/drivers/media/dvb-frontends/lgdt330x.c
....@@ -1,18 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Support for LGDT3302 and LGDT3303 - VSB/QAM
34 *
45 * 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
- *
166 */
177
188 /*
....@@ -929,16 +919,16 @@
929919 struct i2c_board_info board_info = {};
930920 struct lgdt330x_config config = *_config;
931921
932
- strlcpy(board_info.type, "lgdt330x", sizeof(board_info.type));
922
+ strscpy(board_info.type, "lgdt330x", sizeof(board_info.type));
933923 board_info.addr = demod_address;
934924 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))
937927 return NULL;
938928
939929 return lgdt330x_get_dvb_frontend(client);
940930 }
941
-EXPORT_SYMBOL(lgdt330x_attach);
931
+EXPORT_SYMBOL_GPL(lgdt330x_attach);
942932
943933 static const struct dvb_frontend_ops lgdt3302_ops = {
944934 .delsys = { SYS_ATSC, SYS_DVBC_ANNEX_B },