[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201119114149.4117-57-brgl@bgdev.pl>
Date: Thu, 19 Nov 2020 12:41:46 +0100
From: Bartosz Golaszewski <brgl@...ev.pl>
To: Alessandro Zummo <a.zummo@...ertech.it>,
Alexandre Belloni <alexandre.belloni@...tlin.com>
Cc: linux-rtc@...r.kernel.org, linux-kernel@...r.kernel.org,
Bartosz Golaszewski <bgolaszewski@...libre.com>
Subject: [PATCH 56/59] rtc: msm6242: stop using deprecated RTC API
From: Bartosz Golaszewski <bgolaszewski@...libre.com>
devm_rtc_device_register() is deprecated. Use devm_rtc_allocate_device()
and devm_rtc_register_device() pair instead.
Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.com>
---
drivers/rtc/rtc-msm6242.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-msm6242.c b/drivers/rtc/rtc-msm6242.c
index 80e364baac53..b194f8bff403 100644
--- a/drivers/rtc/rtc-msm6242.c
+++ b/drivers/rtc/rtc-msm6242.c
@@ -205,13 +205,14 @@ static int __init msm6242_rtc_probe(struct platform_device *pdev)
return -ENOMEM;
platform_set_drvdata(pdev, priv);
- rtc = devm_rtc_device_register(&pdev->dev, "rtc-msm6242",
- &msm6242_rtc_ops, THIS_MODULE);
+ rtc = devm_rtc_allocate_device(&pdev->dev);
if (IS_ERR(rtc))
return PTR_ERR(rtc);
+ rtc->ops = &msm6242_rtc_ops;
priv->rtc = rtc;
- return 0;
+
+ return devm_rtc_register_device(rtc);
}
static struct platform_driver msm6242_rtc_driver = {
--
2.29.1
Powered by blists - more mailing lists