lkml.org 
[lkml]   [2013]   [Feb]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V2] rtc: add devm_rtc_device_{register,unregister}()
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

Thanks.

--
Dmitry


\
 
 \ /
  Last update: 2013-02-27 00:02    [W:0.121 / U:2.788 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site