hc
2024-05-10 23fa18eaa71266feff7ba8d83022d9e1cc83c65a
kernel/drivers/mfd/twl-core.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * twl_core.c - driver for TWL4030/TWL5030/TWL60X0/TPS659x0 PM
34 * and audio CODEC devices
....@@ -12,20 +13,6 @@
1213 *
1314 * Code cleanup and modifications to IRQ handler.
1415 * 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
2916 */
3017
3118 #include <linux/init.h>
....@@ -1154,12 +1141,12 @@
11541141 if (i == 0) {
11551142 twl->client = client;
11561143 } else {
1157
- twl->client = i2c_new_dummy(client->adapter,
1144
+ twl->client = i2c_new_dummy_device(client->adapter,
11581145 client->addr + i);
1159
- if (!twl->client) {
1146
+ if (IS_ERR(twl->client)) {
11601147 dev_err(&client->dev,
11611148 "can't attach client %d\n", i);
1162
- status = -ENOMEM;
1149
+ status = PTR_ERR(twl->client);
11631150 goto fail;
11641151 }
11651152 }