“e2fdd7fd99dd68b77caaf2a2272b75b5da890de7”上不存在“arch/sparc/include/asm/system_32.h”
提交 e788771c 编写于 作者: B Bruno Thomsen 提交者: Alexandre Belloni

rtc: pcf2127: convert to devm_rtc_allocate_device

This allows further improvement of the driver.
Signed-off-by: NBruno Thomsen <bruno.thomsen@gmail.com>
Link: https://lore.kernel.org/r/20190822131936.18772-1-bruno.thomsen@gmail.comSigned-off-by: NAlexandre Belloni <alexandre.belloni@bootlin.com>
上级 b60ff2cf
......@@ -237,11 +237,12 @@ static int pcf2127_probe(struct device *dev, struct regmap *regmap,
dev_set_drvdata(dev, pcf2127);
pcf2127->rtc = devm_rtc_device_register(dev, name, &pcf2127_rtc_ops,
THIS_MODULE);
pcf2127->rtc = devm_rtc_allocate_device(dev);
if (IS_ERR(pcf2127->rtc))
return PTR_ERR(pcf2127->rtc);
pcf2127->rtc->ops = &pcf2127_rtc_ops;
if (has_nvmem) {
struct nvmem_config nvmem_cfg = {
.priv = pcf2127,
......@@ -253,7 +254,7 @@ static int pcf2127_probe(struct device *dev, struct regmap *regmap,
ret = rtc_nvmem_register(pcf2127->rtc, &nvmem_cfg);
}
return ret;
return rtc_register_device(pcf2127->rtc);
}
#ifdef CONFIG_OF
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册