]> git.itanic.dy.fi Git - linux-stable/commit
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 22:33:37 +0000 (14:33 -0800)
commit21ee23b1b0c36b032eb44f3492151e924832f33d
tree44a8a7045f32a4501d96a76096eff4d45aa7552c
parent98654bc44cfe00f1dfc8caf48079c504c473fdc3
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