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]
Message-ID: <20130310224936.GH4743@avionic-0098.mockup.avionic-design.de>
Date:	Sun, 10 Mar 2013 23:49:36 +0100
From:	Thierry Reding <thierry.reding@...onic-design.de>
To:	Laxman Dewangan <ldewangan@...dia.com>
Cc:	akpm@...ux-foundation.org, a.zummo@...ertech.it,
	swarren@...dotorg.org, rtc-linux@...glegroups.com,
	linux-tegra@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/5] rtc: tegra: use managed rtc_device_register

On Sat, Mar 09, 2013 at 11:43:36PM +0530, Laxman Dewangan wrote:
> Use devm_rtc_device_register for registering rtc device.
> This will reduce the code for unregistering rtc device in
> cleanup path and remove the implementation of remove
> callback of platform driver.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@...dia.com>
> ---
>  drivers/rtc/rtc-tegra.c |   27 ++++-----------------------
>  1 files changed, 4 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/rtc/rtc-tegra.c b/drivers/rtc/rtc-tegra.c
> index 8186405..1ac8199 100644
> --- a/drivers/rtc/rtc-tegra.c
> +++ b/drivers/rtc/rtc-tegra.c
> @@ -348,13 +348,11 @@ static int __init tegra_rtc_probe(struct platform_device *pdev)
>  
>  	device_init_wakeup(&pdev->dev, 1);
>  
> -	info->rtc_dev = rtc_device_register(
> -		pdev->name, &pdev->dev, &tegra_rtc_ops, THIS_MODULE);
> +	info->rtc_dev = devm_rtc_device_register(
> +		dev_name(&pdev->dev), &pdev->dev, &tegra_rtc_ops, THIS_MODULE);

The formatting looks weird on this one. For consistency with the rest of
the file it should look like this:

	info->rtc_dev = devm_rtc_device_register(dev_name(&pdev->dev),
						 &pdev->dev, &tegra_rtc_ops,
						 THIS_MODULE);

With that fixed:

Reviewed-by: Thierry Reding <thierry.reding@...onic-design.de>

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ