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@xxxxxxxxxxx> --- drivers/rtc/rtc-m48t86.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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", -- 2.16.1