rtc: omap: call rtc_nvmem_register()
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 12 Feb 2018 22:47:28 +0000 (23:47 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 1 Mar 2018 09:49:20 +0000 (10:49 +0100)
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>
drivers/rtc/rtc-omap.c

index 09ef802..e53cb27 100644 (file)
@@ -850,7 +850,6 @@ static int omap_rtc_probe(struct platform_device *pdev)
 
        rtc->rtc->ops = &omap_rtc_ops;
        omap_rtc_nvmem_config.priv = rtc;
-       rtc->rtc->nvmem_config = &omap_rtc_nvmem_config;
 
        /* handle periodic and alarm irqs */
        ret = devm_request_irq(&pdev->dev, rtc->irq_timer, rtc_irq, 0,
@@ -886,6 +885,8 @@ static int omap_rtc_probe(struct platform_device *pdev)
        if (ret)
                goto err;
 
+       rtc_nvmem_register(rtc->rtc, &omap_rtc_nvmem_config);
+
        return 0;
 
 err: