lkml.org 
[lkml]   [2013]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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@nvidia.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@avionic-design.de>
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2013-03-11 00:21    [W:0.057 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site