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>
This commit is contained in:
parent
71e19c5e25
commit
3c1bb61fad
1 changed files with 2 additions and 1 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue