Messages in this thread | | | Date | Fri, 5 Sep 2008 11:09:37 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] platform: add new device registration helper |
| |
On Fri, 5 Sep 2008 14:33:18 +0400 Dmitry Baryshkov <dbaryshkov@gmail.com> wrote:
> On Thu, Sep 04, 2008 at 05:20:50PM -0700, Andrew Morton wrote: > > On Fri, 5 Sep 2008 01:30:16 +0400 > > Dmitry Baryshkov <dbaryshkov@gmail.com> wrote: > > > > > Add a helper that registers simple platform_device > > > w/o resources but with parent and device data. > > > > > > This is usefull to cleanup platform code from code that > > > registers such simple devices as leds-gpio, generic-bl, > > > etc. > > > > > > > nits: > > > > > + * > > > + * This function creates a simple platform device that requires minimal > > > + * resource and memory management. Canned release function freeing memory > > > + * allocated for the device allows drivers using such devices to be > > > + * unloaded without waiting for the last reference to the device to be > > > + * dropped. > > > > Should document the return value (tested with IS_ERR) > > Will the wording "Returns a valid platform device, or a valid IS_ERR > condition containing errno" be appropriate?
Sounds good.
> > BTW: would you prefer the followup "fix" patch or just the replacement > one? >
Doesn't worry me at this stage, but Greg would probably like a whole new patch, as he probably didn't merge version 1.
| |