summaryrefslogtreecommitdiffstats
path: root/drivers/iio/pressure/hp03.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-07-22 19:26:13 +0200
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-07-27 22:52:07 +0100
commitb4a339baf35995cd9443439120de60d4605384b1 (patch)
treea6f9b7b26852c49bfd302bfc48838a8c97cf5ef3 /drivers/iio/pressure/hp03.c
parent48cfd4ef0d52c1e02152949556492011b2524555 (diff)
downloadlinux-b4a339baf35995cd9443439120de60d4605384b1.tar.bz2
iio: pressure: hp03: 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: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/pressure/hp03.c')
-rw-r--r--drivers/iio/pressure/hp03.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/iio/pressure/hp03.c b/drivers/iio/pressure/hp03.c
index f00102577fd5..026ba15ef68f 100644
--- a/drivers/iio/pressure/hp03.c
+++ b/drivers/iio/pressure/hp03.c
@@ -243,10 +243,10 @@ static int hp03_probe(struct i2c_client *client,
* which has it's dedicated I2C address and contains
* the calibration constants for the sensor.
*/
- priv->eeprom_client = i2c_new_dummy(client->adapter, HP03_EEPROM_ADDR);
- if (!priv->eeprom_client) {
+ priv->eeprom_client = i2c_new_dummy_device(client->adapter, HP03_EEPROM_ADDR);
+ if (IS_ERR(priv->eeprom_client)) {
dev_err(dev, "New EEPROM I2C device failed\n");
- return -ENODEV;
+ return PTR_ERR(priv->eeprom_client);
}
priv->eeprom_regmap = regmap_init_i2c(priv->eeprom_client,