Re: [PATCH v4 1/2] USB: Use ACPI device information

Rafael J. Wysocki
2014-08-14T23:44:08Z

On Thursday, August 14, 2014 08:45:32 AM Greg Kroah-Hartman wrote:
> On Thu, Aug 14, 2014 at 02:17:59AM +0200, Rafael J. Wysocki wrote:
> > On Thursday, August 14, 2014 06:03:09 AM Greg Kroah-Hartman wrote:
> > > On Wed, Aug 13, 2014 at 07:15:31PM +0200, Samuel Ortiz wrote:
> > > > From: Faouaz TENOUTIT <faouaz.tenoutit@intel.com>
> > > >
> > > > Use ACPI device pld information instead of calling
> > > > acpi_get_physical_device_location.
> > >
> > > Why? What does this do "better" than the existing code?
> >
> > Well, you've acked this patch before. :-)
>
> I can't remember what I ate for Lunch yesterday, let alone previous
> patches I've acked :)
>
> > It just doesn't execute AML from within the USB core. I thought that would
> > be a sufficient reason, wouldn't it?
>
> Yes, that's fine, but a little more description of "why" would have been
> helpful here...

Since we are going to export _PLD output via sysfs ([PATCH 2/2]) and it's
guaranteed to return the same data every time it is evaluated, it simply
makes more sense to evaluate it once and cache the data for when it's
needed. This particular one makes USB use the cached data.

Rafael