From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <balbi@kernel.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
USB <linux-usb@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/2] usb: core: acpi: Use the sysdev pointer instead of controller device
Date: Wed, 27 Apr 2022 10:20:01 +0300 [thread overview]
Message-ID: <YmjuofeN89UvqDMf@kuha.fi.intel.com> (raw)
In-Reply-To: <CAHp75Vdch3shuX6D6YU8=JrFLKq4h_WNYAQPd_bj-hmV6QoQkg@mail.gmail.com>
On Tue, Apr 26, 2022 at 12:18:24PM +0200, Andy Shevchenko wrote:
> 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.
Okay, I'll try to improve the comment.
> > - adev = ACPI_COMPANION(udev->dev.parent);
> > + adev = ACPI_COMPANION(udev->bus->sysdev);
> > return acpi_find_child_device(adev, 0, false);
> > }
thanks,
--
heikki
next prev parent reply other threads:[~2022-04-27 7:20 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-25 12:13 [PATCH v1 0/2] usb: core: acpi: Rely on the sysdev pointer Heikki Krogerus
2022-04-25 12:13 ` [PATCH v1 1/2] usb: core: acpi: Use the sysdev pointer instead of controller device Heikki Krogerus
2022-04-26 10:18 ` Andy Shevchenko
2022-04-27 7:20 ` Heikki Krogerus [this message]
2022-04-25 12:13 ` [PATCH v1 2/2] usb: dwc3: host: Stop setting the ACPI companion Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YmjuofeN89UvqDMf@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
--cc=rafael.j.wysocki@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.