.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * cx18 I2C functions |
---|
3 | 4 | * |
---|
.. | .. |
---|
5 | 6 | * |
---|
6 | 7 | * Copyright (C) 2007 Hans Verkuil <hverkuil@xs4all.nl> |
---|
7 | 8 | * Copyright (C) 2008 Andy Walls <awalls@md.metrocast.net> |
---|
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 "cx18-driver.h" |
---|
.. | .. |
---|
83 | 74 | unsigned short addr_list[2] = { addr, I2C_CLIENT_END }; |
---|
84 | 75 | |
---|
85 | 76 | memset(&info, 0, sizeof(struct i2c_board_info)); |
---|
86 | | - strlcpy(info.type, type, I2C_NAME_SIZE); |
---|
| 77 | + strscpy(info.type, type, I2C_NAME_SIZE); |
---|
87 | 78 | |
---|
88 | 79 | /* Our default information for ir-kbd-i2c.c to use */ |
---|
89 | 80 | switch (hw) { |
---|
.. | .. |
---|
97 | 88 | break; |
---|
98 | 89 | } |
---|
99 | 90 | |
---|
100 | | - return i2c_new_probed_device(adap, &info, addr_list, NULL) == NULL ? |
---|
| 91 | + return IS_ERR(i2c_new_scanned_device(adap, &info, addr_list, NULL)) ? |
---|
101 | 92 | -1 : 0; |
---|
102 | 93 | } |
---|
103 | 94 | |
---|