Commit 25d40164 authored by Wolfram Sang's avatar Wolfram Sang Committed by Guenter Roeck

hwmon: (smm665) convert to i2c_new_dummy_device

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20190722172611.3797-3-wsa+renesas@sang-engineering.comSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 8f9508eb
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment