Re: [PATCH V1 1/1] usb/host: Let usb phy shutdown later
From: Mathias Nyman
Date: Fri Apr 22 2022 - 03:51:27 EST
On 22.4.2022 5.10, surong pang wrote:
> shared_hcd might be freed already here, but hcd should not be freed
> here, because "usb_put_hcd(hcd)" is called later.
To me it still looks like this patch calls usb_phy_shutdown(hcd->usb_phy) _after_
usb_put_hcd(hcd):
>>> @@ -398,6 +397,7 @@ static int xhci_plat_remove(struct platform_device *dev)
>>> clk_disable_unprepare(clk);
>>> clk_disable_unprepare(reg_clk);
>>> usb_put_hcd(hcd);
>>> + usb_phy_shutdown(hcd->usb_phy);
shared hcd was freed even earlier, before disabling the clocks.
Thanks
Mathias