diff options
Diffstat (limited to 'drivers/usb/gadget/ci13xxx_udc.c')
-rw-r--r-- | drivers/usb/gadget/ci13xxx_udc.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/usb/gadget/ci13xxx_udc.c b/drivers/usb/gadget/ci13xxx_udc.c index 27e313718422..243ef1adf969 100644 --- a/drivers/usb/gadget/ci13xxx_udc.c +++ b/drivers/usb/gadget/ci13xxx_udc.c | |||
@@ -2181,6 +2181,7 @@ static int ep_disable(struct usb_ep *ep) | |||
2181 | } while (mEp->dir != direction); | 2181 | } while (mEp->dir != direction); |
2182 | 2182 | ||
2183 | mEp->desc = NULL; | 2183 | mEp->desc = NULL; |
2184 | mEp->ep.desc = NULL; | ||
2184 | 2185 | ||
2185 | spin_unlock_irqrestore(mEp->lock, flags); | 2186 | spin_unlock_irqrestore(mEp->lock, flags); |
2186 | return retval; | 2187 | return retval; |
@@ -2537,7 +2538,7 @@ static int ci13xxx_vbus_draw(struct usb_gadget *_gadget, unsigned mA) | |||
2537 | struct ci13xxx *udc = container_of(_gadget, struct ci13xxx, gadget); | 2538 | struct ci13xxx *udc = container_of(_gadget, struct ci13xxx, gadget); |
2538 | 2539 | ||
2539 | if (udc->transceiver) | 2540 | if (udc->transceiver) |
2540 | return otg_set_power(udc->transceiver, mA); | 2541 | return usb_phy_set_power(udc->transceiver, mA); |
2541 | return -ENOTSUPP; | 2542 | return -ENOTSUPP; |
2542 | } | 2543 | } |
2543 | 2544 | ||
@@ -2900,7 +2901,7 @@ static int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev, | |||
2900 | if (retval < 0) | 2901 | if (retval < 0) |
2901 | goto free_udc; | 2902 | goto free_udc; |
2902 | 2903 | ||
2903 | udc->transceiver = otg_get_transceiver(); | 2904 | udc->transceiver = usb_get_transceiver(); |
2904 | 2905 | ||
2905 | if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) { | 2906 | if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) { |
2906 | if (udc->transceiver == NULL) { | 2907 | if (udc->transceiver == NULL) { |
@@ -2928,7 +2929,8 @@ static int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev, | |||
2928 | goto unreg_device; | 2929 | goto unreg_device; |
2929 | 2930 | ||
2930 | if (udc->transceiver) { | 2931 | if (udc->transceiver) { |
2931 | retval = otg_set_peripheral(udc->transceiver, &udc->gadget); | 2932 | retval = otg_set_peripheral(udc->transceiver->otg, |
2933 | &udc->gadget); | ||
2932 | if (retval) | 2934 | if (retval) |
2933 | goto remove_dbg; | 2935 | goto remove_dbg; |
2934 | } | 2936 | } |
@@ -2945,8 +2947,8 @@ static int udc_probe(struct ci13xxx_udc_driver *driver, struct device *dev, | |||
2945 | 2947 | ||
2946 | remove_trans: | 2948 | remove_trans: |
2947 | if (udc->transceiver) { | 2949 | if (udc->transceiver) { |
2948 | otg_set_peripheral(udc->transceiver, &udc->gadget); | 2950 | otg_set_peripheral(udc->transceiver->otg, &udc->gadget); |
2949 | otg_put_transceiver(udc->transceiver); | 2951 | usb_put_transceiver(udc->transceiver); |
2950 | } | 2952 | } |
2951 | 2953 | ||
2952 | err("error = %i", retval); | 2954 | err("error = %i", retval); |
@@ -2958,7 +2960,7 @@ unreg_device: | |||
2958 | device_unregister(&udc->gadget.dev); | 2960 | device_unregister(&udc->gadget.dev); |
2959 | put_transceiver: | 2961 | put_transceiver: |
2960 | if (udc->transceiver) | 2962 | if (udc->transceiver) |
2961 | otg_put_transceiver(udc->transceiver); | 2963 | usb_put_transceiver(udc->transceiver); |
2962 | free_udc: | 2964 | free_udc: |
2963 | kfree(udc); | 2965 | kfree(udc); |
2964 | _udc = NULL; | 2966 | _udc = NULL; |
@@ -2981,8 +2983,8 @@ static void udc_remove(void) | |||
2981 | usb_del_gadget_udc(&udc->gadget); | 2983 | usb_del_gadget_udc(&udc->gadget); |
2982 | 2984 | ||
2983 | if (udc->transceiver) { | 2985 | if (udc->transceiver) { |
2984 | otg_set_peripheral(udc->transceiver, &udc->gadget); | 2986 | otg_set_peripheral(udc->transceiver->otg, &udc->gadget); |
2985 | otg_put_transceiver(udc->transceiver); | 2987 | usb_put_transceiver(udc->transceiver); |
2986 | } | 2988 | } |
2987 | #ifdef CONFIG_USB_GADGET_DEBUG_FILES | 2989 | #ifdef CONFIG_USB_GADGET_DEBUG_FILES |
2988 | dbg_remove_files(&udc->gadget.dev); | 2990 | dbg_remove_files(&udc->gadget.dev); |