From: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx> devm_rtc_device_register() is deprecated. Use devm_rtc_allocate_device() and devm_rtc_register_device() pair instead. Signed-off-by: Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx> --- drivers/rtc/rtc-pcf50633.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/rtc/rtc-pcf50633.c b/drivers/rtc/rtc-pcf50633.c index 48951a16d65d..d1ee023ce505 100644 --- a/drivers/rtc/rtc-pcf50633.c +++ b/drivers/rtc/rtc-pcf50633.c @@ -249,15 +249,17 @@ static int pcf50633_rtc_probe(struct platform_device *pdev) rtc->pcf = dev_to_pcf50633(pdev->dev.parent); platform_set_drvdata(pdev, rtc); - rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, "pcf50633-rtc", - &pcf50633_rtc_ops, THIS_MODULE); + rtc->rtc_dev = devm_rtc_allocate_device(&pdev->dev); if (IS_ERR(rtc->rtc_dev)) return PTR_ERR(rtc->rtc_dev); + rtc->rtc_dev->ops = &pcf50633_rtc_ops; + pcf50633_register_irq(rtc->pcf, PCF50633_IRQ_ALARM, pcf50633_rtc_irq, rtc); - return 0; + + return devm_rtc_register_device(rtc->rtc_dev); } static int pcf50633_rtc_remove(struct platform_device *pdev) -- 2.29.1