Commit 48cfd4ef authored by Wolfram Sang's avatar Wolfram Sang Committed by Jonathan Cameron

iio: light: veml6070: 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>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent d96dbb3f
No related merge requests found
......@@ -158,10 +158,10 @@ static int veml6070_probe(struct i2c_client *client,
indio_dev->name = VEML6070_DRV_NAME;
indio_dev->modes = INDIO_DIRECT_MODE;
data->client2 = i2c_new_dummy(client->adapter, VEML6070_ADDR_DATA_LSB);
if (!data->client2) {
data->client2 = i2c_new_dummy_device(client->adapter, VEML6070_ADDR_DATA_LSB);
if (IS_ERR(data->client2)) {
dev_err(&client->dev, "i2c device for second chip address failed\n");
return -ENODEV;
return PTR_ERR(data->client2);
}
data->config = VEML6070_IT_10 | VEML6070_COMMAND_RSRVD |
......
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