From: Greg KH <gregkh@linuxfoundation.org>
To: Kyle Tso <kyletso@google.com>
Cc: Thinh.Nguyen@synopsys.com, raychi@google.com, badhri@google.com,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
royluo@google.com, stable@vger.kernel.org
Subject: Re: [PATCH] usb: dwc3: Runtime get and put usb power_supply handle
Date: Wed, 11 Sep 2024 15:29:33 +0200 [thread overview]
Message-ID: <2024091114-armful-lure-1725@gregkh> (raw)
In-Reply-To: <20240715025827.3092761-1-kyletso@google.com>
On Mon, Jul 15, 2024 at 10:58:27AM +0800, Kyle Tso wrote:
> It is possible that the usb power_supply is registered after the probe
> of dwc3. In this case, trying to get the usb power_supply during the
> probe will fail and there is no chance to try again. Also the usb
> power_supply might be unregistered at anytime so that the handle of it
> in dwc3 would become invalid. To fix this, get the handle right before
> calling to power_supply functions and put it afterward.
>
> Fixes: 6f0764b5adea ("usb: dwc3: add a power supply for current control")
> Cc: stable@vger.kernel.org
> Signed-off-by: Kyle Tso <kyletso@google.com>
> ---
> drivers/usb/dwc3/core.c | 25 +++++--------------------
> drivers/usb/dwc3/core.h | 4 ++--
> drivers/usb/dwc3/gadget.c | 19 ++++++++++++++-----
> 3 files changed, 21 insertions(+), 27 deletions(-)
Did this get lost somewhere? You might need to resend it now that Thinh
is back from vacation.
thanks,
greg k-h
next prev parent reply other threads:[~2024-09-11 13:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-15 2:58 [PATCH] usb: dwc3: Runtime get and put usb power_supply handle Kyle Tso
2024-09-11 13:29 ` Greg KH [this message]
2024-09-11 22:19 ` Thinh Nguyen
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=2024091114-armful-lure-1725@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=badhri@google.com \
--cc=kyletso@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=raychi@google.com \
--cc=royluo@google.com \
--cc=stable@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox