summaryrefslogtreecommitdiff
path: root/drivers/usb/musb/sunxi.c
diff options
context:
space:
mode:
authorBin Liu <b-liu@ti.com>2018-05-21 16:42:15 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-05-22 13:03:25 +0300
commit7ad76955c67b705550a7ba7f632b838486753d65 (patch)
tree59f89bcdfec5f93d34c63d40219ccedb50a2821d /drivers/usb/musb/sunxi.c
parent55479956f37379d04f95316dd562c24970fa300b (diff)
downloadlinux-7ad76955c67b705550a7ba7f632b838486753d65.tar.xz
usb: musb: remove duplicated port mode enum
include/linux/usb/musb.h already defines enum for musb port mode, so remove the duplicate in musb_core.h and use the definition in musb.h. Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb/sunxi.c')
-rw-r--r--drivers/usb/musb/sunxi.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c
index 2d201219ecff..8f7d378b7e7e 100644
--- a/drivers/usb/musb/sunxi.c
+++ b/drivers/usb/musb/sunxi.c
@@ -347,7 +347,7 @@ static int sunxi_musb_set_mode(struct musb *musb, u8 mode)
if (glue->phy_mode == new_mode)
return 0;
- if (musb->port_mode != MUSB_PORT_MODE_DUAL_ROLE) {
+ if (musb->port_mode != MUSB_OTG) {
dev_err(musb->controller->parent,
"Error changing modes is only supported in dual role mode\n");
return -EINVAL;
@@ -690,19 +690,19 @@ static int sunxi_musb_probe(struct platform_device *pdev)
switch (usb_get_dr_mode(&pdev->dev)) {
#if defined CONFIG_USB_MUSB_DUAL_ROLE || defined CONFIG_USB_MUSB_HOST
case USB_DR_MODE_HOST:
- pdata.mode = MUSB_PORT_MODE_HOST;
+ pdata.mode = MUSB_HOST;
glue->phy_mode = PHY_MODE_USB_HOST;
break;
#endif
#if defined CONFIG_USB_MUSB_DUAL_ROLE || defined CONFIG_USB_MUSB_GADGET
case USB_DR_MODE_PERIPHERAL:
- pdata.mode = MUSB_PORT_MODE_GADGET;
+ pdata.mode = MUSB_PERIPHERAL;
glue->phy_mode = PHY_MODE_USB_DEVICE;
break;
#endif
#ifdef CONFIG_USB_MUSB_DUAL_ROLE
case USB_DR_MODE_OTG:
- pdata.mode = MUSB_PORT_MODE_DUAL_ROLE;
+ pdata.mode = MUSB_OTG;
glue->phy_mode = PHY_MODE_USB_OTG;
break;
#endif