Re: [PATCH v3] rtc: add devm_rtc_device_{register,unregister}()

From: Jingoo Han
Date: Wed Mar 06 2013 - 01:12:56 EST


On Wednesday, March 06, 2013 3:03 PM, Venu Byravarasu wrote:
>
> > --- a/drivers/rtc/class.c
> > +++ b/drivers/rtc/class.c
>
> > +/**
> > + * devm_rtc_device_register - resource managed rtc_device_register()
> > + * @name: the name of the device
> > + * @dev: the device to register
> > + * @ops: the rtc operations structure
> > + * @owner: the module owner
> > + *
> > + * @return a struct rtc on success, or an ERR_PTR on error
> > + *
> > + * Managed rtc_device_register(). The rtc_device returned from this
> > function
> > + * are automatically freed on driver detach. See rtc_device_register()
> > + * for more information.
> > + */
> > +
> > +struct rtc_device *devm_rtc_device_register(const char *name,
> > + struct device *dev,
>
> As most of devm_* functions use " struct device *dev" as their first param,
> why not this function also modified to be in sync with them?

Yes, but, I want to sync with the form of rtc_device_register().
This function already uses 'struct device *dev' as second argument as below.

struct rtc_device *rtc_device_register(const char *name, struct device *dev,
const struct rtc_class_ops *ops,
struct module *owner)

Best regards,
Jingoo Han

>
> > + const struct rtc_class_ops *ops,
> > + struct module *owner)
> > +{
> > + struct rtc_device **ptr, *rtc;
?移»®&Þ~º&¶¬–+-깁負¥Šw®왢쎉喝méb욎dz받–)í끾èw*jgП¨¶‰šŽ듶¢j/곴äz받–듺2듷솳鈺Ú&¢)傘«a뛴®G«앶h®æj:+v돣Šwè녪¥>W슧違iÛaxPjØm¶Ÿÿà -»+껠dš_