lkml.org 
[lkml]   [2018]   [Mar]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2018-03-27 17:11    [W:0.079 / U:0.352 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site