[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180327150751.GC22441@piout.net>
Date: Tue, 27 Mar 2018 17:07:51 +0200
From: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
To: Sean Wang <sean.wang@...iatek.com>
Cc: robh+dt@...nel.org, mark.rutland@....com, sre@...nel.org,
lee.jones@...aro.org, a.zummo@...ertech.it,
eddie.huang@...iatek.com, devicetree@...r.kernel.org,
linux-rtc@...r.kernel.org, linux-pm@...r.kernel.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 09/16] rtc: mediatek: convert to use device managed
functions
On 26/03/2018 at 12:07:45 +0800, Sean Wang wrote:
> > > - rtc->rtc_dev = rtc_device_register("mt6397-rtc", &pdev->dev,
> > > - &mtk_rtc_ops, THIS_MODULE);
> > > + rtc->rtc_dev = devm_rtc_device_register(&pdev->dev, "mt6397-rtc",
> > > + &mtk_rtc_ops, THIS_MODULE);
> >
> > You should probably switch to devm_rtc_allocate_device() and
> > rtc_register_device instead of devm_rtc_device_register.
> >
>
> Just would like to know something details
>
> It seems you just encourage me to switch into the new registration
> method and currently devm_rtc_device_register I used for the driver
> shouldn't cause any harm. right?
>
It will work but it will have to be converted to rtc_register_device
later anyway.
--
Alexandre Belloni, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists