Re: [PATCH v2] usb: dwc3: Runtime get and put usb power_supply handle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jul 26, 2024 at 8:28 PM Kyle Tso <kyletso@xxxxxxxxxx> 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@xxxxxxxxxxxxxxx
> Signed-off-by: Kyle Tso <kyletso@xxxxxxxxxx>
> ---
> v1 -> v2:
> - move power_supply_put out of interrupt context
>

Hi maintainers,

It seems that there are some problems in version 2. I will send out
version 3 later.

Kyle





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux