projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
25d4016
)
hwmon: (w83781d) convert to i2c_new_dummy_device
author
Wolfram Sang
<wsa+renesas@sang-engineering.com>
Mon, 22 Jul 2019 17:26:10 +0000
(19:26 +0200)
committer
Guenter Roeck
<linux@roeck-us.net>
Tue, 3 Sep 2019 19:47:17 +0000
(12:47 -0700)
Move from i2c_new_dummy() to i2c_new_dummy_device(), so we now get an
ERRPTR which we use in error handling.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link:
https://lore.kernel.org/r/20190722172611.3797-4-wsa+renesas@sang-engineering.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/w83781d.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/w83781d.c
b/drivers/hwmon/w83781d.c
index d2c04b6a3f2b7cfd7974b8cf19ae1f21ad80ed69..015f1ea319669eff7932daf49456a6638b9a7add 100644
(file)
--- a/
drivers/hwmon/w83781d.c
+++ b/
drivers/hwmon/w83781d.c
@@
-894,12
+894,12
@@
w83781d_detect_subclients(struct i2c_client *new_client)
}
for (i = 0; i < num_sc; i++) {
- data->lm75[i] = i2c_new_dummy(adapter, sc_addr[i]);
- if (
!data->lm75[i]
) {
+ data->lm75[i] = i2c_new_dummy
_device
(adapter, sc_addr[i]);
+ if (
IS_ERR(data->lm75[i])
) {
dev_err(&new_client->dev,
"Subclient %d registration at address 0x%x failed.\n",
i, sc_addr[i]);
- err =
-ENOMEM
;
+ err =
PTR_ERR(data->lm75[i])
;
if (i == 1)
goto ERROR_SC_3;
goto ERROR_SC_2;