diff options
author | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-06-06 11:58:04 +0300 |
---|---|---|
committer | Oleksandr Suvorov <oleksandr.suvorov@toradex.com> | 2019-06-06 11:58:04 +0300 |
commit | 07f204867fdf469fb124a96361309c92ae45f99c (patch) | |
tree | c9da1d8278a7a762acc0588d0b2c089097679814 | |
parent | 433228dd5f06cd483db983fed04388f3486c111b (diff) |
usb: chipidea: Fix enum name conflict
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 <oleksandr.suvorov@toradex.com>
-rw-r--r-- | drivers/usb/chipidea/ci.h | 6 | ||||
-rw-r--r-- | drivers/usb/phy/phy-mxs-usb.c | 2 | ||||
-rw-r--r-- | include/linux/usb/phy.h | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/chipidea/ci.h b/drivers/usb/chipidea/ci.h index bfd5dab11dbc..8ab112a55f06 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 diff --git a/include/linux/usb/phy.h b/include/linux/usb/phy.h index ef89950cb68a..178cc094e9d4 100644 --- a/include/linux/usb/phy.h +++ b/include/linux/usb/phy.h @@ -65,9 +65,9 @@ enum usb_otg_state { /* The usb role of phy to be working with */ enum usb_current_mode { - USB_MODE_NONE, - USB_MODE_HOST, - USB_MODE_DEVICE, + USB_CURRENT_MODE_NONE, + USB_CURRENT_MODE_HOST, + USB_CURRENT_MODE_DEVICE, }; struct usb_phy; |