Messages in this thread | | | Date | Sun, 10 Mar 2013 23:49:36 +0100 | From | Thierry Reding <> | 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@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] | |