Skip to content

Commit ff2b89d

Browse files
Xu Yanggregkh
authored andcommitted
usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
When CONFIG_USB_OTG is not set, mxs_phy_is_otg_host() will always return false. This behaviour is wrong. Since phy.last_event will always be set for either host or device mode. Therefore, CONFIG_USB_OTG condition can be removed. Fixes: 5eda42a ("usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()") cc: <stable@vger.kernel.org> Acked-by: Peter Chen <peter.chen@kernel.org> Signed-off-by: Xu Yang <xu.yang_2@nxp.com> Link: https://lore.kernel.org/r/20231228110753.1755756-3-xu.yang_2@nxp.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 128d849 commit ff2b89d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/usb/phy/phy-mxs-usb.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,8 +388,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect)
388388

389389
static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy)
390390
{
391-
return IS_ENABLED(CONFIG_USB_OTG) &&
392-
mxs_phy->phy.last_event == USB_EVENT_ID;
391+
return mxs_phy->phy.last_event == USB_EVENT_ID;
393392
}
394393

395394
static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)

0 commit comments

Comments
 (0)