Re: [PATCH 01/20] drivers_base: platform: use always ->name for uevent

Greg KH
2011-08-22T22:01:09Z

On Mon, Aug 22, 2011 at 02:41:54PM -0700, Sarah Sharp wrote:
> On Mon, Aug 15, 2011 at 09:17:41AM -0600, Grant Likely wrote:
> > On Mon, Aug 15, 2011 at 9:13 AM, Sebastian Andrzej Siewior
> > <bigeasy@linutronix.de> wrote:
> > > Grant Likely wrote:
> > >>>
> > >>> --- a/drivers/base/platform.c
> > >>> +++ b/drivers/base/platform.c
> > >>> @@ -614,7 +614,7 @@ static int platform_uevent(struct device *dev, struct
> > >>> kobj_uevent_env *env)
> > >>>               return rc;
> > >>>
> > >>>       add_uevent_var(env, "MODALIAS=%s%s", PLATFORM_MODULE_PREFIX,
> > >>> -               (pdev->id_entry) ? pdev->id_entry->name : pdev->name);
> > >>> +                       pdev->name);
> > >>
> > >> Yes, this looks like the right thing to do to me.  Also, I think the
> > >> original code is suspect because it causes the uevent data to be
> > >> different after binding a driver to a device.
> > >
> > > Why different? The code matches (pdev->name == id->name) or
> > > (pdev->name ==  driver->name) so in both cases it should be equal to
> > > pdev->name.
> > >
> > > Are you or Greg taking this?
> >
> > This one is all Greg.
>
> Greg, do you want to take this patch through your driver core tree, or
> would you prefer to have it come through the xHCI tree?

I'll take it in my driver-core tree separate, as the others don't depend
on this one, right?

greg k-h