From 3723d3fe35f90fc8a12dada3a883543dc431b9bd Mon Sep 17 00:00:00 2001 From: Oleksandr Suvorov Date: Thu, 6 Jun 2019 11:58:04 +0300 Subject: usb: chipidea: Fix enum name conflict MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a compilation error: CC drivers/rtc/rtc-lib.o In file included from drivers/phy/ti/phy-omap-usb2.c:30:0: ./include/linux/phy/omap_control_phy.h:46:2: error: redeclaration of enumerator ‘USB_MODE_HOST’ USB_MODE_HOST, ^~~~~~~~~~~~~ In file included from ./include/linux/usb/otg.h:14:0, from ./include/linux/phy/omap_usb.h:23, from drivers/phy/ti/phy-omap-usb2.c:24: ./include/linux/usb/phy.h:69:2: note: previous definition of ‘USB_MODE_HOST’ was here USB_MODE_HOST, ^~~~~~~~~~~~~ In file included from drivers/phy/ti/phy-omap-usb2.c:30:0: ./include/linux/phy/omap_control_phy.h:47:2: error: redeclaration of enumerator ‘USB_MODE_DEVICE’ USB_MODE_DEVICE, ^~~~~~~~~~~~~~~ In file included from ./include/linux/usb/otg.h:14:0, from ./include/linux/phy/omap_usb.h:23, from drivers/phy/ti/phy-omap-usb2.c:24: ./include/linux/usb/phy.h:70:2: note: previous definition of ‘USB_MODE_DEVICE’ was here USB_MODE_DEVICE, ^~~~~~~~~~~~~~~ make[3]: *** [scripts/Makefile.build:328: drivers/phy/ti/phy-omap-usb2.o] Error 1 AR drivers/pps/clients/built-in.o make[2]: *** [scripts/Makefile.build:587: drivers/phy/ti] Error 2 make[1]: *** [scripts/Makefile.build:587: drivers/phy] Error 2 make[1]: *** Waiting for unfinished jobs.... CC drivers/rtc/hctosys.o Related to: #50570 Signed-off-by: Oleksandr Suvorov --- drivers/usb/chipidea/ci.h | 6 +++--- drivers/usb/phy/phy-mxs-usb.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index fed2a6ffb77b..4c2dd28423b9 100644 --- a/drivers/usb/chipidea/ci.h +++ b/drivers/usb/chipidea/ci.h @@ -311,10 +311,10 @@ static inline int ci_role_start(struct ci_hdrc *ci, enum ci_role role) if (ci->usb_phy) { if (role == CI_ROLE_HOST) usb_phy_set_mode(ci->usb_phy, - USB_MODE_HOST); + USB_CURRENT_MODE_HOST); else usb_phy_set_mode(ci->usb_phy, - USB_MODE_DEVICE); + USB_CURRENT_MODE_DEVICE); } return 0; @@ -332,7 +332,7 @@ static inline void ci_role_stop(struct ci_hdrc *ci) ci->roles[role]->stop(ci); if (ci->usb_phy) - usb_phy_set_mode(ci->usb_phy, USB_MODE_NONE); + usb_phy_set_mode(ci->usb_phy, USB_CURRENT_MODE_NONE); } /** diff --git a/drivers/usb/phy/phy-mxs-usb.c b/drivers/usb/phy/phy-mxs-usb.c index 18e256ad7ed6..ba8f0866e2fc 100644 --- a/drivers/usb/phy/phy-mxs-usb.c +++ b/drivers/usb/phy/phy-mxs-usb.c @@ -484,7 +484,7 @@ static void mxs_phy_disconnect_line(struct mxs_phy *mxs_phy, bool on) vbus_is_on = mxs_phy_get_vbus_status(mxs_phy); - if (on && ((!vbus_is_on && mxs_phy->mode != USB_MODE_HOST) || + if (on && ((!vbus_is_on && mxs_phy->mode != USB_CURRENT_MODE_HOST) || (last_event == USB_EVENT_VBUS))) __mxs_phy_disconnect_line(mxs_phy, true); else -- cgit v1.2.3