1
0
Fork 0

rtc: m48t86: call rtc_nvmem_register()

Call rtc_nvmem_register instead of letting the core do it and stop using
the nvmem_config member of struct rtc_device.

Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
hifive-unleashed-5.1
Alexandre Belloni 2018-02-12 23:47:26 +01:00
parent 71e19c5e25
commit 3c1bb61fad
1 changed files with 2 additions and 1 deletions

View File

@ -266,13 +266,14 @@ static int m48t86_rtc_probe(struct platform_device *pdev)
info->rtc->ops = &m48t86_rtc_ops;
m48t86_nvmem_cfg.priv = &pdev->dev;
info->rtc->nvmem_config = &m48t86_nvmem_cfg;
info->rtc->nvram_old_abi = true;
err = rtc_register_device(info->rtc);
if (err)
return err;
rtc_nvmem_register(info->rtc, &m48t86_nvmem_cfg);
/* read battery status */
reg = m48t86_readb(&pdev->dev, M48T86_D);
dev_info(&pdev->dev, "battery %s\n",