diff options
author | Felipe Balbi <balbi@ti.com> | 2015-02-02 18:14:12 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-03-09 11:38:48 -0400 |
commit | d5638fcf15bc65584877f00d4b0094cc4a66ad4e (patch) | |
tree | b297677a78e0383fd11aa032d759619d450f547a | |
parent | 9eccca0843205f87c00404b663188b88eb248051 (diff) |
usb: musb: gadget: get rid of stop_activity()
that function is pretty close to a no-op by now,
all we need is a call to musb_stop().
Signed-off-by: Felipe Balbi <balbi@ti.com>
-rw-r--r-- | drivers/usb/musb/musb_gadget.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index b2d9040c7685..4c481cd66c77 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1876,44 +1876,6 @@ err: | |||
1876 | return retval; | 1876 | return retval; |
1877 | } | 1877 | } |
1878 | 1878 | ||
1879 | static void stop_activity(struct musb *musb, struct usb_gadget_driver *driver) | ||
1880 | { | ||
1881 | int i; | ||
1882 | struct musb_hw_ep *hw_ep; | ||
1883 | |||
1884 | /* don't disconnect if it's not connected */ | ||
1885 | if (musb->g.speed == USB_SPEED_UNKNOWN) | ||
1886 | driver = NULL; | ||
1887 | else | ||
1888 | musb->g.speed = USB_SPEED_UNKNOWN; | ||
1889 | |||
1890 | /* deactivate the hardware */ | ||
1891 | if (musb->softconnect) { | ||
1892 | musb->softconnect = 0; | ||
1893 | musb_pullup(musb, 0); | ||
1894 | } | ||
1895 | musb_stop(musb); | ||
1896 | |||
1897 | /* killing any outstanding requests will quiesce the driver; | ||
1898 | * then report disconnect | ||
1899 | */ | ||
1900 | if (driver) { | ||
1901 | for (i = 0, hw_ep = musb->endpoints; | ||
1902 | i < musb->nr_endpoints; | ||
1903 | i++, hw_ep++) { | ||
1904 | musb_ep_select(musb->mregs, i); | ||
1905 | if (hw_ep->is_shared_fifo /* || !epnum */) { | ||
1906 | nuke(&hw_ep->ep_in, -ESHUTDOWN); | ||
1907 | } else { | ||
1908 | if (hw_ep->max_packet_sz_tx) | ||
1909 | nuke(&hw_ep->ep_in, -ESHUTDOWN); | ||
1910 | if (hw_ep->max_packet_sz_rx) | ||
1911 | nuke(&hw_ep->ep_out, -ESHUTDOWN); | ||
1912 | } | ||
1913 | } | ||
1914 | } | ||
1915 | } | ||
1916 | |||
1917 | /* | 1879 | /* |
1918 | * Unregister the gadget driver. Used by gadget drivers when | 1880 | * Unregister the gadget driver. Used by gadget drivers when |
1919 | * unregistering themselves from the controller. | 1881 | * unregistering themselves from the controller. |
@@ -1940,7 +1902,7 @@ static int musb_gadget_stop(struct usb_gadget *g) | |||
1940 | (void) musb_gadget_vbus_draw(&musb->g, 0); | 1902 | (void) musb_gadget_vbus_draw(&musb->g, 0); |
1941 | 1903 | ||
1942 | musb->xceiv->otg->state = OTG_STATE_UNDEFINED; | 1904 | musb->xceiv->otg->state = OTG_STATE_UNDEFINED; |
1943 | stop_activity(musb, NULL); | 1905 | musb_stop(musb); |
1944 | otg_set_peripheral(musb->xceiv->otg, NULL); | 1906 | otg_set_peripheral(musb->xceiv->otg, NULL); |
1945 | 1907 | ||
1946 | musb->is_active = 0; | 1908 | musb->is_active = 0; |