summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2018-02-12 23:47:26 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2018-03-01 10:49:18 +0100
commit3c1bb61fad370d7c440b8f81df76cbb4d52a9b6f (patch)
treec4cf6f13f867f2a471d3a0c323de6556fa7bf031 /drivers/rtc
parent71e19c5e25792db5f46d525eb5743186b148326d (diff)
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>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-m48t86.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-m48t86.c b/drivers/rtc/rtc-m48t86.c
index d9aea9b6d9cd..3a48a7eb3e9c 100644
--- a/drivers/rtc/rtc-m48t86.c
+++ b/drivers/rtc/rtc-m48t86.c
@@ -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",