.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * twl_core.c - driver for TWL4030/TWL5030/TWL60X0/TPS659x0 PM |
---|
3 | 4 | * and audio CODEC devices |
---|
.. | .. |
---|
12 | 13 | * |
---|
13 | 14 | * Code cleanup and modifications to IRQ handler. |
---|
14 | 15 | * by syed khasim <x0khasim@ti.com> |
---|
15 | | - * |
---|
16 | | - * This program is free software; you can redistribute it and/or modify |
---|
17 | | - * it under the terms of the GNU General Public License as published by |
---|
18 | | - * the Free Software Foundation; either version 2 of the License, or |
---|
19 | | - * (at your option) any later version. |
---|
20 | | - * |
---|
21 | | - * This program is distributed in the hope that it will be useful, |
---|
22 | | - * but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
23 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
24 | | - * GNU General Public License for more details. |
---|
25 | | - * |
---|
26 | | - * You should have received a copy of the GNU General Public License |
---|
27 | | - * along with this program; if not, write to the Free Software |
---|
28 | | - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
29 | 16 | */ |
---|
30 | 17 | |
---|
31 | 18 | #include <linux/init.h> |
---|
.. | .. |
---|
1154 | 1141 | if (i == 0) { |
---|
1155 | 1142 | twl->client = client; |
---|
1156 | 1143 | } else { |
---|
1157 | | - twl->client = i2c_new_dummy(client->adapter, |
---|
| 1144 | + twl->client = i2c_new_dummy_device(client->adapter, |
---|
1158 | 1145 | client->addr + i); |
---|
1159 | | - if (!twl->client) { |
---|
| 1146 | + if (IS_ERR(twl->client)) { |
---|
1160 | 1147 | dev_err(&client->dev, |
---|
1161 | 1148 | "can't attach client %d\n", i); |
---|
1162 | | - status = -ENOMEM; |
---|
| 1149 | + status = PTR_ERR(twl->client); |
---|
1163 | 1150 | goto fail; |
---|
1164 | 1151 | } |
---|
1165 | 1152 | } |
---|