Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c1bb61f authored by Alexandre Belloni's avatar Alexandre Belloni
Browse files

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: default avatarAlexandre Belloni <alexandre.belloni@bootlin.com>
parent 71e19c5e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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",