Re: [PATCH] platform: add new device registration helper

From: Andrew Morton
Date: Fri Sep 05 2008 - 14:10:28 EST


On Fri, 5 Sep 2008 14:33:18 +0400 Dmitry Baryshkov <dbaryshkov@xxxxxxxxx> 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@xxxxxxxxx> 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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/