hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/mfd/88pm860x-core.c
....@@ -1,13 +1,10 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /*
23 * Base driver for Marvell 88PM8607
34 *
45 * Copyright (C) 2009 Marvell International Ltd.
56 *
67 * Author: Haojian Zhuang <haojian.zhuang@marvell.com>
7
- *
8
- * This program is free software; you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License version 2 as
10
- * published by the Free Software Foundation.
118 */
129
1310 #include <linux/kernel.h>
....@@ -1181,12 +1178,12 @@
11811178 */
11821179 if (pdata->companion_addr && (pdata->companion_addr != client->addr)) {
11831180 chip->companion_addr = pdata->companion_addr;
1184
- chip->companion = i2c_new_dummy(chip->client->adapter,
1181
+ chip->companion = i2c_new_dummy_device(chip->client->adapter,
11851182 chip->companion_addr);
1186
- if (!chip->companion) {
1183
+ if (IS_ERR(chip->companion)) {
11871184 dev_err(&client->dev,
11881185 "Failed to allocate I2C companion device\n");
1189
- return -ENODEV;
1186
+ return PTR_ERR(chip->companion);
11901187 }
11911188 chip->regmap_companion = regmap_init_i2c(chip->companion,
11921189 &pm860x_regmap_config);