summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorXu Yang <xu.yang_2@nxp.com>2023-12-28 14:07:53 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-01-26 02:27:39 +0300
commit789eade47fd90d71c47d5991cc2eb8e39452f0bd (patch)
tree3b979de90a17e402e983535e60e04fcde3f2ce74 /drivers/usb
parentc952654e1a27ebfabbec4c128fd3b638a38f7b36 (diff)
downloadlinux-789eade47fd90d71c47d5991cc2eb8e39452f0bd.tar.xz
usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
commit ff2b89de471da942a4d853443688113a44fd35ed upstream. 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: 5eda42aebb76 ("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>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/phy/phy-mxs-usb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c
index 9299df53eb9d..160c9264339f 100644
--- a/drivers/usb/phy/phy-mxs-usb.c
+++ b/drivers/usb/phy/phy-mxs-usb.c
@@ -388,8 +388,7 @@ static void __mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool disconnect)
static bool mxs_phy_is_otg_host(struct mxs_phy *mxs_phy)
{
- return IS_ENABLED(CONFIG_USB_OTG) &&
- mxs_phy->phy.last_event == USB_EVENT_ID;
+ return mxs_phy->phy.last_event == USB_EVENT_ID;
}
static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on)