forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/drivers/mfd/bcm590xx.c
....@@ -1,13 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Broadcom BCM590xx PMU
34 *
45 * Copyright 2014 Linaro Limited
56 * Author: Matt Porter <mporter@linaro.org>
6
- *
7
- * This program is free software; you can redistribute it and/or modify it
8
- * under the terms of the GNU General Public License as published by the
9
- * Free Software Foundation; either version 2 of the License, or (at your
10
- * option) any later version.
117 */
128
139 #include <linux/err.h>
....@@ -65,11 +61,11 @@
6561 }
6662
6763 /* Secondary I2C slave address is the base address with A(2) asserted */
68
- bcm590xx->i2c_sec = i2c_new_dummy(i2c_pri->adapter,
64
+ bcm590xx->i2c_sec = i2c_new_dummy_device(i2c_pri->adapter,
6965 i2c_pri->addr | BIT(2));
70
- if (!bcm590xx->i2c_sec) {
66
+ if (IS_ERR(bcm590xx->i2c_sec)) {
7167 dev_err(&i2c_pri->dev, "failed to add secondary I2C device\n");
72
- return -ENODEV;
68
+ return PTR_ERR(bcm590xx->i2c_sec);
7369 }
7470 i2c_set_clientdata(bcm590xx->i2c_sec, bcm590xx);
7571