summaryrefslogtreecommitdiffstats
path: root/drivers/rtc
diff options
context:
space:
mode:
authorWolfram Sang <wsa+renesas@sang-engineering.com>2019-07-22 19:26:16 +0200
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-07-23 20:34:15 +0200
commit7150710f3084de8d35ce3221eeae2caee8813f92 (patch)
tree34ea220496939486d2b2ee71743f99799a23b353 /drivers/rtc
parent46eabee1f6e6495ea465d7ad8bb971c40ba4dc9e (diff)
downloadlinux-7150710f3084de8d35ce3221eeae2caee8813f92.tar.bz2
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: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org> Tested-by: Krzysztof Kozlowski <krzk@kernel.org> Link: https://lore.kernel.org/r/20190722172618.4061-3-wsa+renesas@sang-engineering.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-max77686.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-max77686.c b/drivers/rtc/rtc-max77686.c
index 4aff349ae301..3d924c34fd73 100644
--- a/drivers/rtc/rtc-max77686.c
+++ b/drivers/rtc/rtc-max77686.c
@@ -693,11 +693,11 @@ static int max77686_init_rtc_regmap(struct max77686_rtc_info *info)
goto add_rtc_irq;
}
- info->rtc = i2c_new_dummy(parent_i2c->adapter,
- info->drv_data->rtc_i2c_addr);
- if (!info->rtc) {
+ info->rtc = i2c_new_dummy_device(parent_i2c->adapter,
+ info->drv_data->rtc_i2c_addr);
+ if (IS_ERR(info->rtc)) {
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,