[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-id: <007601ce148f$ddce3280$996a9780$%han@samsung.com>
Date: Wed, 27 Feb 2013 11:12:17 +0900
From: Jingoo Han <jg1.han@...sung.com>
To: 'Dmitry Torokhov' <dmitry.torokhov@...il.com>
Cc: 'Andrew Morton' <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org, 'Tejun Heo' <tj@...nel.org>,
'Greg KH' <greg@...ah.com>,
'Alessandro Zummo' <a.zummo@...ertech.it>,
rtc-linux@...glegroups.com, 'Jingoo Han' <jg1.han@...sung.com>
Subject: Re: [PATCH V2] rtc: add devm_rtc_device_{register,unregister}()
On Wednesday, February 27, 2013 7:33 AM, Dmitry Torokhov wrote:
>
> On Tue, Feb 26, 2013 at 10:21:06AM +0900, Jingoo Han wrote:
> > +/**
> > + * devm_rtc_device_unregister - resource managed devm_rtc_device_unregister()
> > + * @dev: the device to unregister
> > + * @rtc: the RTC class device to unregister
> > + *
> > + * Deallocated a rtc allocated with devm_rtc_device_register(). Normally this
> > + * function will not need to be called and the resource management code will
> > + * ensure that the resource is freed.
> > + */
> > +void devm_rtc_device_unregister(struct device *dev, struct rtc_device *rtc)
>
> Why do you need a separate function? You can add a flag to struct rtc_device
> so it knows whether it is devm-managed or not and behave accordingly.
> And then you can do
>
> #define devm_rtc_device_unregister rtc_device_unregister
Um, I don't prefer that way using additional a flag.
Also, most of other devm_* functions are using a separate functions
such as devm_pwm_put(), devm_regulator_put(),devm_usb_put_phy(), etc.
>
> Thanks.
>
> --
> Dmitry
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists