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] [day] [month] [year] [list]
Date:   Wed, 1 Apr 2020 10:28:01 +0000
From:   Adam Thomson <Adam.Thomson.Opensource@...semi.com>
To:     Alexandre Belloni <alexandre.belloni@...tlin.com>,
        Support Opensource <Support.Opensource@...semi.com>,
        Alessandro Zummo <a.zummo@...ertech.it>
CC:     Adam Thomson <Adam.Thomson.Opensource@...semi.com>,
        "linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v2] rtc: da9052: convert to devm_rtc_allocate_device

On 29 March 2020 23:43, Alexandre Belloni wrote:

> This allows further improvement of the driver.
> 
> Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com>

Acked-by: Adam Thomson <Adam.Thomson.Opensource@...semi.com>

> ---
> 
> Changes in v2:
>  - avoid reordering rtc registration and irq request.
> 
>  drivers/rtc/rtc-da9052.c | 10 +++++++---
>  1 file changed, 7 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-da9052.c b/drivers/rtc/rtc-da9052.c
> index 204eb7cf1aa4..e76561b8ad4c 100644
> --- a/drivers/rtc/rtc-da9052.c
> +++ b/drivers/rtc/rtc-da9052.c
> @@ -298,12 +298,16 @@ static int da9052_rtc_probe(struct platform_device
> *pdev)
>  		rtc_err(rtc, "Failed to disable TICKS: %d\n", ret);
> 
>  	device_init_wakeup(&pdev->dev, true);
> -	rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
> -				       &da9052_rtc_ops, THIS_MODULE);
> -
> +	rtc->rtc = devm_rtc_allocate_device(&pdev->dev);
>  	if (IS_ERR(rtc->rtc))
>  		return PTR_ERR(rtc->rtc);
> 
> +	rtc->rtc->ops = &da9052_rtc_ops;
> +
> +	ret = rtc_register_device(rtc->rtc);
> +	if (ret)
> +		return ret;
> +
>  	ret = da9052_request_irq(rtc->da9052, DA9052_IRQ_ALARM, "ALM",
>  				da9052_rtc_irq, rtc);
>  	if (ret != 0) {
> --
> 2.25.1

Powered by blists - more mailing lists