]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/rtc/rtc-s5m.c
Merge tag 'pci-v5.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
[linux.git] / drivers / rtc / rtc-s5m.c
index c7f1bf823ea094e6d352c4e4926fa1ad106cdff0..eb9dde4095a99b811160159534d3429f0c48291b 100644 (file)
@@ -760,10 +760,10 @@ static int s5m_rtc_probe(struct platform_device *pdev)
                return -ENODEV;
        }
 
-       info->i2c = i2c_new_dummy(s5m87xx->i2c->adapter, RTC_I2C_ADDR);
-       if (!info->i2c) {
+       info->i2c = i2c_new_dummy_device(s5m87xx->i2c->adapter, RTC_I2C_ADDR);
+       if (IS_ERR(info->i2c)) {
                dev_err(&pdev->dev, "Failed to allocate I2C for RTC\n");
-               return -ENODEV;
+               return PTR_ERR(info->i2c);
        }
 
        info->regmap = devm_regmap_init_i2c(info->i2c, regmap_cfg);