usb: phy: mxs: remove CONFIG_USB_OTG condition for mxs_phy_is_otg_host()
authorXu Yang <xu.yang_2@nxp.com>
Thu, 28 Dec 2023 11:07:53 +0000 (19:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:42 +0000 (15:35 -0800)
commitf09cfc753944924e13af28af804932f2443b515f
treeb13b2497820229ec128f28cde9824cca4e42e67a
parent53eea0d939e3136b47e3456e9d0bc4e0a1fe3424
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>
drivers/usb/phy/phy-mxs-usb.c