diff options
Diffstat (limited to 'drivers/usb/renesas_usbhs/mod_gadget.c')
-rw-r--r-- | drivers/usb/renesas_usbhs/mod_gadget.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index dd41f61893ef..f2985cd88021 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c | |||
@@ -545,15 +545,6 @@ static int usbhsg_pipe_disable(struct usbhsg_uep *uep) | |||
545 | return 0; | 545 | return 0; |
546 | } | 546 | } |
547 | 547 | ||
548 | static void usbhsg_uep_init(struct usbhsg_gpriv *gpriv) | ||
549 | { | ||
550 | int i; | ||
551 | struct usbhsg_uep *uep; | ||
552 | |||
553 | usbhsg_for_each_uep_with_dcp(uep, gpriv, i) | ||
554 | uep->pipe = NULL; | ||
555 | } | ||
556 | |||
557 | /* | 548 | /* |
558 | * | 549 | * |
559 | * usb_ep_ops | 550 | * usb_ep_ops |
@@ -610,7 +601,12 @@ static int usbhsg_ep_disable(struct usb_ep *ep) | |||
610 | { | 601 | { |
611 | struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); | 602 | struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep); |
612 | 603 | ||
613 | return usbhsg_pipe_disable(uep); | 604 | usbhsg_pipe_disable(uep); |
605 | |||
606 | uep->pipe->mod_private = NULL; | ||
607 | uep->pipe = NULL; | ||
608 | |||
609 | return 0; | ||
614 | } | 610 | } |
615 | 611 | ||
616 | static struct usb_request *usbhsg_ep_alloc_request(struct usb_ep *ep, | 612 | static struct usb_request *usbhsg_ep_alloc_request(struct usb_ep *ep, |
@@ -761,9 +757,8 @@ static int usbhsg_try_start(struct usbhs_priv *priv, u32 status) | |||
761 | usbhs_pipe_init(priv, | 757 | usbhs_pipe_init(priv, |
762 | usbhsg_dma_map_ctrl); | 758 | usbhsg_dma_map_ctrl); |
763 | usbhs_fifo_init(priv); | 759 | usbhs_fifo_init(priv); |
764 | usbhsg_uep_init(gpriv); | ||
765 | 760 | ||
766 | /* dcp init */ | 761 | /* dcp init instead of usbhsg_ep_enable() */ |
767 | dcp->pipe = usbhs_dcp_malloc(priv); | 762 | dcp->pipe = usbhs_dcp_malloc(priv); |
768 | dcp->pipe->mod_private = dcp; | 763 | dcp->pipe->mod_private = dcp; |
769 | usbhs_pipe_config_update(dcp->pipe, 0, 0, 64); | 764 | usbhs_pipe_config_update(dcp->pipe, 0, 0, 64); |
@@ -825,7 +820,7 @@ static int usbhsg_try_stop(struct usbhs_priv *priv, u32 status) | |||
825 | usbhs_sys_set_test_mode(priv, 0); | 820 | usbhs_sys_set_test_mode(priv, 0); |
826 | usbhs_sys_function_ctrl(priv, 0); | 821 | usbhs_sys_function_ctrl(priv, 0); |
827 | 822 | ||
828 | usbhsg_pipe_disable(dcp); | 823 | usbhsg_ep_disable(&dcp->ep); |
829 | 824 | ||
830 | dev_dbg(dev, "stop gadget\n"); | 825 | dev_dbg(dev, "stop gadget\n"); |
831 | 826 | ||
@@ -998,6 +993,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv) | |||
998 | */ | 993 | */ |
999 | usbhsg_for_each_uep_with_dcp(uep, gpriv, i) { | 994 | usbhsg_for_each_uep_with_dcp(uep, gpriv, i) { |
1000 | uep->gpriv = gpriv; | 995 | uep->gpriv = gpriv; |
996 | uep->pipe = NULL; | ||
1001 | snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i); | 997 | snprintf(uep->ep_name, EP_NAME_SIZE, "ep%d", i); |
1002 | 998 | ||
1003 | uep->ep.name = uep->ep_name; | 999 | uep->ep.name = uep->ep_name; |