lkml.org 
[lkml]   [2022]   [Apr]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 1/2] usb: core: acpi: Use the sysdev pointer instead of controller device
On Mon, Apr 25, 2022 at 3:41 PM Heikki Krogerus
<heikki.krogerus@linux.intel.com> wrote:
>
> The controller device (hcd) does not always have the ACPI
> companion assigned to it at all. We can not rely on it when
> finding the ACPI companion for the root hub. Instead we need
> to use the sysdev pointer here.

...

> if (!udev->parent) {
> /* root hub is only child (_ADR=0) under its parent, the HC */

I believe the comment can be amended now to point out that we use the
physical device representing the parent of this child, and not
(always) a direct parent of the device in terms of Linux device model.

> - adev = ACPI_COMPANION(udev->dev.parent);
> + adev = ACPI_COMPANION(udev->bus->sysdev);
> return acpi_find_child_device(adev, 0, false);
> }


--
With Best Regards,
Andy Shevchenko

\
 
 \ /
  Last update: 2022-04-26 12:35    [W:0.117 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site