lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 19 Nov 2020 12:41:06 +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 16/59] rtc: pxa: 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-pxa.c | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/drivers/rtc/rtc-pxa.c b/drivers/rtc/rtc-pxa.c
index d2f1d8f754bf..56d22576ae0e 100644
--- a/drivers/rtc/rtc-pxa.c
+++ b/drivers/rtc/rtc-pxa.c
@@ -351,17 +351,14 @@ static int __init pxa_rtc_probe(struct platform_device *pdev)
 
 	rtsr_clear_bits(pxa_rtc, RTSR_PIALE | RTSR_RDALE1 | RTSR_HZE);
 
-	pxa_rtc->rtc = devm_rtc_device_register(&pdev->dev, "pxa-rtc",
-						&pxa_rtc_ops, THIS_MODULE);
-	if (IS_ERR(pxa_rtc->rtc)) {
-		ret = PTR_ERR(pxa_rtc->rtc);
-		dev_err(dev, "Failed to register RTC device -> %d\n", ret);
-		return ret;
-	}
+	pxa_rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
+	if (IS_ERR(pxa_rtc->rtc))
+		return PTR_ERR(pxa_rtc->rtc);
 
+	pxa_rtc->rtc->ops = &pxa_rtc_ops;
 	device_init_wakeup(dev, 1);
 
-	return 0;
+	return devm_rtc_register_device(pxa_rtc->rtc);
 }
 
 static int __exit pxa_rtc_remove(struct platform_device *pdev)
-- 
2.29.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ