Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7150710f authored by Wolfram Sang's avatar Wolfram Sang Committed by Alexandre Belloni
Browse files

rtc: max77686: 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>
Reviewed-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Tested-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Link: https://lore.kernel.org/r/20190722172618.4061-3-wsa+renesas@sang-engineering.com


Signed-off-by: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 46eabee1
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -693,11 +693,11 @@ static int max77686_init_rtc_regmap(struct max77686_rtc_info *info)
		goto add_rtc_irq;
		goto add_rtc_irq;
	}
	}


	info->rtc = i2c_new_dummy(parent_i2c->adapter,
	info->rtc = i2c_new_dummy_device(parent_i2c->adapter,
					 info->drv_data->rtc_i2c_addr);
					 info->drv_data->rtc_i2c_addr);
	if (!info->rtc) {
	if (IS_ERR(info->rtc)) {
		dev_err(info->dev, "Failed to allocate I2C device for RTC\n");
		dev_err(info->dev, "Failed to allocate I2C device for RTC\n");
		return -ENODEV;
		return PTR_ERR(info->rtc);
	}
	}


	info->rtc_regmap = devm_regmap_init_i2c(info->rtc,
	info->rtc_regmap = devm_regmap_init_i2c(info->rtc,