OSDN Git Service
(root)
/
tomoyo
/
tomoyo-test1.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f9508e
)
hwmon: (smm665) convert to i2c_new_dummy_device
author
Wolfram Sang
<wsa+renesas@sang-engineering.com>
Mon, 22 Jul 2019 17:26:09 +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-3-wsa+renesas@sang-engineering.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/smm665.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/smm665.c
b/drivers/hwmon/smm665.c
index
d8c91c2
..
6eff14f
100644
(file)
--- a/
drivers/hwmon/smm665.c
+++ b/
drivers/hwmon/smm665.c
@@
-586,10
+586,10
@@
static int smm665_probe(struct i2c_client *client,
data->client = client;
data->type = id->driver_data;
- data->cmdreg = i2c_new_dummy(adapter, (client->addr & ~SMM665_REGMASK)
+ data->cmdreg = i2c_new_dummy
_device
(adapter, (client->addr & ~SMM665_REGMASK)
| SMM665_CMDREG_BASE);
- if (
!data->cmdreg
)
- return
-ENOMEM
;
+ if (
IS_ERR(data->cmdreg)
)
+ return
PTR_ERR(data->cmdreg)
;
switch (data->type) {
case smm465: