diff options
author | Felipe Balbi <balbi@ti.com> | 2014-10-17 13:05:12 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-11-03 11:01:16 -0500 |
commit | 22835b807e7ca946a4d1fbd4c7af56aa09cd273e (patch) | |
tree | 2b96d92ea6dbaadf7880c9729e5bfb3cb3265978 /drivers | |
parent | 8da9fe8af8e3fd953b346c800976a5db6c0115a4 (diff) |
usb: gadget: remove unnecessary 'driver' argument
now that no UDC driver relies on the extra
'driver' argument to ->udc_stop(), we can
safely remove it.
This commit is based on previous work by
Robert Baldyga <r.baldyga@samsung.com> which
can be found at [1]; however that patch turned
out to have a high probability of regressing
many UDC drivers because of a blind search & replace
s/driver/$udc->driver/ which caused the 'driver'
argument to stop_activity() to be a valid non-NULL
pointer when it should be NULL, thus causing UDCs
to mistakenly call gadget driver's ->disconnect()
callback.
[1] http://markmail.org/message/x5zneg4xea4zntab
Acked-by: Peter Chen <peter.chen@freescale.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
31 files changed, 54 insertions, 97 deletions
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 0444d3f8971a..f4397b29891f 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c | |||
@@ -1544,8 +1544,7 @@ static int ci_udc_pullup(struct usb_gadget *_gadget, int is_on) | |||
1544 | 1544 | ||
1545 | static int ci_udc_start(struct usb_gadget *gadget, | 1545 | static int ci_udc_start(struct usb_gadget *gadget, |
1546 | struct usb_gadget_driver *driver); | 1546 | struct usb_gadget_driver *driver); |
1547 | static int ci_udc_stop(struct usb_gadget *gadget, | 1547 | static int ci_udc_stop(struct usb_gadget *gadget); |
1548 | struct usb_gadget_driver *driver); | ||
1549 | /** | 1548 | /** |
1550 | * Device operations part of the API to the USB controller hardware, | 1549 | * Device operations part of the API to the USB controller hardware, |
1551 | * which don't involve endpoints (or i/o) | 1550 | * which don't involve endpoints (or i/o) |
@@ -1682,8 +1681,7 @@ static int ci_udc_start(struct usb_gadget *gadget, | |||
1682 | /** | 1681 | /** |
1683 | * ci_udc_stop: unregister a gadget driver | 1682 | * ci_udc_stop: unregister a gadget driver |
1684 | */ | 1683 | */ |
1685 | static int ci_udc_stop(struct usb_gadget *gadget, | 1684 | static int ci_udc_stop(struct usb_gadget *gadget) |
1686 | struct usb_gadget_driver *driver) | ||
1687 | { | 1685 | { |
1688 | struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); | 1686 | struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); |
1689 | unsigned long flags; | 1687 | unsigned long flags; |
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index eee87098bb8b..441f1c4b8eb4 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c | |||
@@ -2921,8 +2921,7 @@ err: | |||
2921 | * | 2921 | * |
2922 | * Stop udc hw block and stay tunned for future transmissions | 2922 | * Stop udc hw block and stay tunned for future transmissions |
2923 | */ | 2923 | */ |
2924 | static int s3c_hsotg_udc_stop(struct usb_gadget *gadget, | 2924 | static int s3c_hsotg_udc_stop(struct usb_gadget *gadget) |
2925 | struct usb_gadget_driver *driver) | ||
2926 | { | 2925 | { |
2927 | struct s3c_hsotg *hsotg = to_hsotg(gadget); | 2926 | struct s3c_hsotg *hsotg = to_hsotg(gadget); |
2928 | unsigned long flags = 0; | 2927 | unsigned long flags = 0; |
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c index 20e4ee922c47..20dda60b27c3 100644 --- a/drivers/usb/dwc3/gadget.c +++ b/drivers/usb/dwc3/gadget.c | |||
@@ -1630,8 +1630,7 @@ err0: | |||
1630 | return ret; | 1630 | return ret; |
1631 | } | 1631 | } |
1632 | 1632 | ||
1633 | static int dwc3_gadget_stop(struct usb_gadget *g, | 1633 | static int dwc3_gadget_stop(struct usb_gadget *g) |
1634 | struct usb_gadget_driver *driver) | ||
1635 | { | 1634 | { |
1636 | struct dwc3 *dwc = gadget_to_dwc(g); | 1635 | struct dwc3 *dwc = gadget_to_dwc(g); |
1637 | unsigned long flags; | 1636 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/amd5536udc.c b/drivers/usb/gadget/udc/amd5536udc.c index 7d0e0b8a9606..606b9009861a 100644 --- a/drivers/usb/gadget/udc/amd5536udc.c +++ b/drivers/usb/gadget/udc/amd5536udc.c | |||
@@ -1401,9 +1401,8 @@ static int udc_wakeup(struct usb_gadget *gadget) | |||
1401 | 1401 | ||
1402 | static int amd5536_udc_start(struct usb_gadget *g, | 1402 | static int amd5536_udc_start(struct usb_gadget *g, |
1403 | struct usb_gadget_driver *driver); | 1403 | struct usb_gadget_driver *driver); |
1404 | static int amd5536_udc_stop(struct usb_gadget *g, | 1404 | static int amd5536_udc_stop(struct usb_gadget *g); |
1405 | struct usb_gadget_driver *driver); | 1405 | |
1406 | /* gadget operations */ | ||
1407 | static const struct usb_gadget_ops udc_ops = { | 1406 | static const struct usb_gadget_ops udc_ops = { |
1408 | .wakeup = udc_wakeup, | 1407 | .wakeup = udc_wakeup, |
1409 | .get_frame = udc_get_frame, | 1408 | .get_frame = udc_get_frame, |
@@ -1962,8 +1961,7 @@ __acquires(dev->lock) | |||
1962 | } | 1961 | } |
1963 | 1962 | ||
1964 | /* Called by gadget driver to unregister itself */ | 1963 | /* Called by gadget driver to unregister itself */ |
1965 | static int amd5536_udc_stop(struct usb_gadget *g, | 1964 | static int amd5536_udc_stop(struct usb_gadget *g) |
1966 | struct usb_gadget_driver *driver) | ||
1967 | { | 1965 | { |
1968 | struct udc *dev = to_amd5536_udc(g); | 1966 | struct udc *dev = to_amd5536_udc(g); |
1969 | unsigned long flags; | 1967 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c index 5c4cede5365d..f47f16c25f15 100644 --- a/drivers/usb/gadget/udc/at91_udc.c +++ b/drivers/usb/gadget/udc/at91_udc.c | |||
@@ -984,8 +984,8 @@ static int at91_set_selfpowered(struct usb_gadget *gadget, int is_on) | |||
984 | 984 | ||
985 | static int at91_start(struct usb_gadget *gadget, | 985 | static int at91_start(struct usb_gadget *gadget, |
986 | struct usb_gadget_driver *driver); | 986 | struct usb_gadget_driver *driver); |
987 | static int at91_stop(struct usb_gadget *gadget, | 987 | static int at91_stop(struct usb_gadget *gadget); |
988 | struct usb_gadget_driver *driver); | 988 | |
989 | static const struct usb_gadget_ops at91_udc_ops = { | 989 | static const struct usb_gadget_ops at91_udc_ops = { |
990 | .get_frame = at91_get_frame, | 990 | .get_frame = at91_get_frame, |
991 | .wakeup = at91_wakeup, | 991 | .wakeup = at91_wakeup, |
@@ -1644,8 +1644,7 @@ static int at91_start(struct usb_gadget *gadget, | |||
1644 | return 0; | 1644 | return 0; |
1645 | } | 1645 | } |
1646 | 1646 | ||
1647 | static int at91_stop(struct usb_gadget *gadget, | 1647 | static int at91_stop(struct usb_gadget *gadget) |
1648 | struct usb_gadget_driver *driver) | ||
1649 | { | 1648 | { |
1650 | struct at91_udc *udc; | 1649 | struct at91_udc *udc; |
1651 | unsigned long flags; | 1650 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c index eaee5f90e9fd..c537a6604b46 100644 --- a/drivers/usb/gadget/udc/atmel_usba_udc.c +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c | |||
@@ -987,8 +987,8 @@ usba_udc_set_selfpowered(struct usb_gadget *gadget, int is_selfpowered) | |||
987 | 987 | ||
988 | static int atmel_usba_start(struct usb_gadget *gadget, | 988 | static int atmel_usba_start(struct usb_gadget *gadget, |
989 | struct usb_gadget_driver *driver); | 989 | struct usb_gadget_driver *driver); |
990 | static int atmel_usba_stop(struct usb_gadget *gadget, | 990 | static int atmel_usba_stop(struct usb_gadget *gadget); |
991 | struct usb_gadget_driver *driver); | 991 | |
992 | static const struct usb_gadget_ops usba_udc_ops = { | 992 | static const struct usb_gadget_ops usba_udc_ops = { |
993 | .get_frame = usba_udc_get_frame, | 993 | .get_frame = usba_udc_get_frame, |
994 | .wakeup = usba_udc_wakeup, | 994 | .wakeup = usba_udc_wakeup, |
@@ -1807,8 +1807,7 @@ static int atmel_usba_start(struct usb_gadget *gadget, | |||
1807 | return 0; | 1807 | return 0; |
1808 | } | 1808 | } |
1809 | 1809 | ||
1810 | static int atmel_usba_stop(struct usb_gadget *gadget, | 1810 | static int atmel_usba_stop(struct usb_gadget *gadget) |
1811 | struct usb_gadget_driver *driver) | ||
1812 | { | 1811 | { |
1813 | struct usba_udc *udc = container_of(gadget, struct usba_udc, gadget); | 1812 | struct usba_udc *udc = container_of(gadget, struct usba_udc, gadget); |
1814 | unsigned long flags; | 1813 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/bcm63xx_udc.c b/drivers/usb/gadget/udc/bcm63xx_udc.c index 485c8c2bddc1..9319ff27c73f 100644 --- a/drivers/usb/gadget/udc/bcm63xx_udc.c +++ b/drivers/usb/gadget/udc/bcm63xx_udc.c | |||
@@ -1836,8 +1836,7 @@ static int bcm63xx_udc_start(struct usb_gadget *gadget, | |||
1836 | * @gadget: USB slave device. | 1836 | * @gadget: USB slave device. |
1837 | * @driver: Driver for USB slave devices. | 1837 | * @driver: Driver for USB slave devices. |
1838 | */ | 1838 | */ |
1839 | static int bcm63xx_udc_stop(struct usb_gadget *gadget, | 1839 | static int bcm63xx_udc_stop(struct usb_gadget *gadget) |
1840 | struct usb_gadget_driver *driver) | ||
1841 | { | 1840 | { |
1842 | struct bcm63xx_udc *udc = gadget_to_udc(gadget); | 1841 | struct bcm63xx_udc *udc = gadget_to_udc(gadget); |
1843 | unsigned long flags; | 1842 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/dummy_hcd.c b/drivers/usb/gadget/udc/dummy_hcd.c index 5c72ade61aa6..5bffb75922f8 100644 --- a/drivers/usb/gadget/udc/dummy_hcd.c +++ b/drivers/usb/gadget/udc/dummy_hcd.c | |||
@@ -851,8 +851,7 @@ static int dummy_pullup(struct usb_gadget *_gadget, int value) | |||
851 | 851 | ||
852 | static int dummy_udc_start(struct usb_gadget *g, | 852 | static int dummy_udc_start(struct usb_gadget *g, |
853 | struct usb_gadget_driver *driver); | 853 | struct usb_gadget_driver *driver); |
854 | static int dummy_udc_stop(struct usb_gadget *g, | 854 | static int dummy_udc_stop(struct usb_gadget *g); |
855 | struct usb_gadget_driver *driver); | ||
856 | 855 | ||
857 | static const struct usb_gadget_ops dummy_ops = { | 856 | static const struct usb_gadget_ops dummy_ops = { |
858 | .get_frame = dummy_g_get_frame, | 857 | .get_frame = dummy_g_get_frame, |
@@ -913,8 +912,7 @@ static int dummy_udc_start(struct usb_gadget *g, | |||
913 | return 0; | 912 | return 0; |
914 | } | 913 | } |
915 | 914 | ||
916 | static int dummy_udc_stop(struct usb_gadget *g, | 915 | static int dummy_udc_stop(struct usb_gadget *g) |
917 | struct usb_gadget_driver *driver) | ||
918 | { | 916 | { |
919 | struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g); | 917 | struct dummy_hcd *dum_hcd = gadget_to_dummy_hcd(g); |
920 | struct dummy *dum = dum_hcd->dum; | 918 | struct dummy *dum = dum_hcd->dum; |
diff --git a/drivers/usb/gadget/udc/fotg210-udc.c b/drivers/usb/gadget/udc/fotg210-udc.c index 1d315921bf34..1ca52e11eb98 100644 --- a/drivers/usb/gadget/udc/fotg210-udc.c +++ b/drivers/usb/gadget/udc/fotg210-udc.c | |||
@@ -1053,8 +1053,7 @@ static void fotg210_init(struct fotg210_udc *fotg210) | |||
1053 | iowrite32(value, fotg210->reg + FOTG210_DMISGR0); | 1053 | iowrite32(value, fotg210->reg + FOTG210_DMISGR0); |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | static int fotg210_udc_stop(struct usb_gadget *g, | 1056 | static int fotg210_udc_stop(struct usb_gadget *g) |
1057 | struct usb_gadget_driver *driver) | ||
1058 | { | 1057 | { |
1059 | struct fotg210_udc *fotg210 = gadget_to_fotg210(g); | 1058 | struct fotg210_udc *fotg210 = gadget_to_fotg210(g); |
1060 | unsigned long flags; | 1059 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/fsl_qe_udc.c b/drivers/usb/gadget/udc/fsl_qe_udc.c index 6ca61e6b72e5..01f29ef622bc 100644 --- a/drivers/usb/gadget/udc/fsl_qe_udc.c +++ b/drivers/usb/gadget/udc/fsl_qe_udc.c | |||
@@ -1887,8 +1887,7 @@ static int qe_get_frame(struct usb_gadget *gadget) | |||
1887 | 1887 | ||
1888 | static int fsl_qe_start(struct usb_gadget *gadget, | 1888 | static int fsl_qe_start(struct usb_gadget *gadget, |
1889 | struct usb_gadget_driver *driver); | 1889 | struct usb_gadget_driver *driver); |
1890 | static int fsl_qe_stop(struct usb_gadget *gadget, | 1890 | static int fsl_qe_stop(struct usb_gadget *gadget); |
1891 | struct usb_gadget_driver *driver); | ||
1892 | 1891 | ||
1893 | /* defined in usb_gadget.h */ | 1892 | /* defined in usb_gadget.h */ |
1894 | static const struct usb_gadget_ops qe_gadget_ops = { | 1893 | static const struct usb_gadget_ops qe_gadget_ops = { |
@@ -2308,8 +2307,7 @@ static int fsl_qe_start(struct usb_gadget *gadget, | |||
2308 | return 0; | 2307 | return 0; |
2309 | } | 2308 | } |
2310 | 2309 | ||
2311 | static int fsl_qe_stop(struct usb_gadget *gadget, | 2310 | static int fsl_qe_stop(struct usb_gadget *gadget) |
2312 | struct usb_gadget_driver *driver) | ||
2313 | { | 2311 | { |
2314 | struct qe_udc *udc; | 2312 | struct qe_udc *udc; |
2315 | struct qe_ep *loop_ep; | 2313 | struct qe_ep *loop_ep; |
diff --git a/drivers/usb/gadget/udc/fsl_udc_core.c b/drivers/usb/gadget/udc/fsl_udc_core.c index c3620791a315..b184ed3ef37a 100644 --- a/drivers/usb/gadget/udc/fsl_udc_core.c +++ b/drivers/usb/gadget/udc/fsl_udc_core.c | |||
@@ -1236,9 +1236,8 @@ static int fsl_pullup(struct usb_gadget *gadget, int is_on) | |||
1236 | 1236 | ||
1237 | static int fsl_udc_start(struct usb_gadget *g, | 1237 | static int fsl_udc_start(struct usb_gadget *g, |
1238 | struct usb_gadget_driver *driver); | 1238 | struct usb_gadget_driver *driver); |
1239 | static int fsl_udc_stop(struct usb_gadget *g, | 1239 | static int fsl_udc_stop(struct usb_gadget *g); |
1240 | struct usb_gadget_driver *driver); | 1240 | |
1241 | /* defined in gadget.h */ | ||
1242 | static const struct usb_gadget_ops fsl_gadget_ops = { | 1241 | static const struct usb_gadget_ops fsl_gadget_ops = { |
1243 | .get_frame = fsl_get_frame, | 1242 | .get_frame = fsl_get_frame, |
1244 | .wakeup = fsl_wakeup, | 1243 | .wakeup = fsl_wakeup, |
@@ -1975,8 +1974,7 @@ static int fsl_udc_start(struct usb_gadget *g, | |||
1975 | } | 1974 | } |
1976 | 1975 | ||
1977 | /* Disconnect from gadget driver */ | 1976 | /* Disconnect from gadget driver */ |
1978 | static int fsl_udc_stop(struct usb_gadget *g, | 1977 | static int fsl_udc_stop(struct usb_gadget *g) |
1979 | struct usb_gadget_driver *driver) | ||
1980 | { | 1978 | { |
1981 | struct fsl_ep *loop_ep; | 1979 | struct fsl_ep *loop_ep; |
1982 | unsigned long flags; | 1980 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/fusb300_udc.c b/drivers/usb/gadget/udc/fusb300_udc.c index 8286df72add4..a1b33f534b52 100644 --- a/drivers/usb/gadget/udc/fusb300_udc.c +++ b/drivers/usb/gadget/udc/fusb300_udc.c | |||
@@ -1320,8 +1320,7 @@ static int fusb300_udc_start(struct usb_gadget *g, | |||
1320 | return 0; | 1320 | return 0; |
1321 | } | 1321 | } |
1322 | 1322 | ||
1323 | static int fusb300_udc_stop(struct usb_gadget *g, | 1323 | static int fusb300_udc_stop(struct usb_gadget *g) |
1324 | struct usb_gadget_driver *driver) | ||
1325 | { | 1324 | { |
1326 | struct fusb300 *fusb300 = to_fusb300(g); | 1325 | struct fusb300 *fusb300 = to_fusb300(g); |
1327 | 1326 | ||
diff --git a/drivers/usb/gadget/udc/goku_udc.c b/drivers/usb/gadget/udc/goku_udc.c index bf9c5ef8b56b..5b9176e7202a 100644 --- a/drivers/usb/gadget/udc/goku_udc.c +++ b/drivers/usb/gadget/udc/goku_udc.c | |||
@@ -992,8 +992,7 @@ static int goku_get_frame(struct usb_gadget *_gadget) | |||
992 | 992 | ||
993 | static int goku_udc_start(struct usb_gadget *g, | 993 | static int goku_udc_start(struct usb_gadget *g, |
994 | struct usb_gadget_driver *driver); | 994 | struct usb_gadget_driver *driver); |
995 | static int goku_udc_stop(struct usb_gadget *g, | 995 | static int goku_udc_stop(struct usb_gadget *g); |
996 | struct usb_gadget_driver *driver); | ||
997 | 996 | ||
998 | static const struct usb_gadget_ops goku_ops = { | 997 | static const struct usb_gadget_ops goku_ops = { |
999 | .get_frame = goku_get_frame, | 998 | .get_frame = goku_get_frame, |
@@ -1364,8 +1363,7 @@ static void stop_activity(struct goku_udc *dev) | |||
1364 | udc_enable(dev); | 1363 | udc_enable(dev); |
1365 | } | 1364 | } |
1366 | 1365 | ||
1367 | static int goku_udc_stop(struct usb_gadget *g, | 1366 | static int goku_udc_stop(struct usb_gadget *g) |
1368 | struct usb_gadget_driver *driver) | ||
1369 | { | 1367 | { |
1370 | struct goku_udc *dev = to_goku_udc(g); | 1368 | struct goku_udc *dev = to_goku_udc(g); |
1371 | unsigned long flags; | 1369 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/gr_udc.c b/drivers/usb/gadget/udc/gr_udc.c index bde989f566c3..320df9a250ff 100644 --- a/drivers/usb/gadget/udc/gr_udc.c +++ b/drivers/usb/gadget/udc/gr_udc.c | |||
@@ -1935,8 +1935,7 @@ static int gr_udc_start(struct usb_gadget *gadget, | |||
1935 | return 0; | 1935 | return 0; |
1936 | } | 1936 | } |
1937 | 1937 | ||
1938 | static int gr_udc_stop(struct usb_gadget *gadget, | 1938 | static int gr_udc_stop(struct usb_gadget *gadget) |
1939 | struct usb_gadget_driver *driver) | ||
1940 | { | 1939 | { |
1941 | struct gr_udc *dev = to_gr_udc(gadget); | 1940 | struct gr_udc *dev = to_gr_udc(gadget); |
1942 | unsigned long flags; | 1941 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/lpc32xx_udc.c b/drivers/usb/gadget/udc/lpc32xx_udc.c index cef64b98b6e5..4be497d39d91 100644 --- a/drivers/usb/gadget/udc/lpc32xx_udc.c +++ b/drivers/usb/gadget/udc/lpc32xx_udc.c | |||
@@ -2559,7 +2559,7 @@ static int lpc32xx_pullup(struct usb_gadget *gadget, int is_on) | |||
2559 | } | 2559 | } |
2560 | 2560 | ||
2561 | static int lpc32xx_start(struct usb_gadget *, struct usb_gadget_driver *); | 2561 | static int lpc32xx_start(struct usb_gadget *, struct usb_gadget_driver *); |
2562 | static int lpc32xx_stop(struct usb_gadget *, struct usb_gadget_driver *); | 2562 | static int lpc32xx_stop(struct usb_gadget *); |
2563 | 2563 | ||
2564 | static const struct usb_gadget_ops lpc32xx_udc_ops = { | 2564 | static const struct usb_gadget_ops lpc32xx_udc_ops = { |
2565 | .get_frame = lpc32xx_get_frame, | 2565 | .get_frame = lpc32xx_get_frame, |
@@ -2961,8 +2961,7 @@ static int lpc32xx_start(struct usb_gadget *gadget, | |||
2961 | return 0; | 2961 | return 0; |
2962 | } | 2962 | } |
2963 | 2963 | ||
2964 | static int lpc32xx_stop(struct usb_gadget *gadget, | 2964 | static int lpc32xx_stop(struct usb_gadget *gadget) |
2965 | struct usb_gadget_driver *driver) | ||
2966 | { | 2965 | { |
2967 | int i; | 2966 | int i; |
2968 | struct lpc32xx_udc *udc = to_udc(gadget); | 2967 | struct lpc32xx_udc *udc = to_udc(gadget); |
diff --git a/drivers/usb/gadget/udc/m66592-udc.c b/drivers/usb/gadget/udc/m66592-udc.c index 898565687a8c..311ec5f1cbfe 100644 --- a/drivers/usb/gadget/udc/m66592-udc.c +++ b/drivers/usb/gadget/udc/m66592-udc.c | |||
@@ -1485,8 +1485,7 @@ static int m66592_udc_start(struct usb_gadget *g, | |||
1485 | return 0; | 1485 | return 0; |
1486 | } | 1486 | } |
1487 | 1487 | ||
1488 | static int m66592_udc_stop(struct usb_gadget *g, | 1488 | static int m66592_udc_stop(struct usb_gadget *g) |
1489 | struct usb_gadget_driver *driver) | ||
1490 | { | 1489 | { |
1491 | struct m66592 *m66592 = to_m66592(g); | 1490 | struct m66592 *m66592 = to_m66592(g); |
1492 | 1491 | ||
diff --git a/drivers/usb/gadget/udc/mv_u3d_core.c b/drivers/usb/gadget/udc/mv_u3d_core.c index e3ef744c4ff9..ea422ac79990 100644 --- a/drivers/usb/gadget/udc/mv_u3d_core.c +++ b/drivers/usb/gadget/udc/mv_u3d_core.c | |||
@@ -1266,8 +1266,7 @@ static int mv_u3d_start(struct usb_gadget *g, | |||
1266 | return 0; | 1266 | return 0; |
1267 | } | 1267 | } |
1268 | 1268 | ||
1269 | static int mv_u3d_stop(struct usb_gadget *g, | 1269 | static int mv_u3d_stop(struct usb_gadget *g) |
1270 | struct usb_gadget_driver *driver) | ||
1271 | { | 1270 | { |
1272 | struct mv_u3d *u3d = container_of(g, struct mv_u3d, gadget); | 1271 | struct mv_u3d *u3d = container_of(g, struct mv_u3d, gadget); |
1273 | struct mv_usb_platform_data *pdata = dev_get_platdata(u3d->dev); | 1272 | struct mv_usb_platform_data *pdata = dev_get_platdata(u3d->dev); |
diff --git a/drivers/usb/gadget/udc/mv_udc_core.c b/drivers/usb/gadget/udc/mv_udc_core.c index 32d24ff2c4cd..f104ac090a99 100644 --- a/drivers/usb/gadget/udc/mv_udc_core.c +++ b/drivers/usb/gadget/udc/mv_udc_core.c | |||
@@ -1223,7 +1223,7 @@ static int mv_udc_pullup(struct usb_gadget *gadget, int is_on) | |||
1223 | } | 1223 | } |
1224 | 1224 | ||
1225 | static int mv_udc_start(struct usb_gadget *, struct usb_gadget_driver *); | 1225 | static int mv_udc_start(struct usb_gadget *, struct usb_gadget_driver *); |
1226 | static int mv_udc_stop(struct usb_gadget *, struct usb_gadget_driver *); | 1226 | static int mv_udc_stop(struct usb_gadget *); |
1227 | /* device controller usb_gadget_ops structure */ | 1227 | /* device controller usb_gadget_ops structure */ |
1228 | static const struct usb_gadget_ops mv_ops = { | 1228 | static const struct usb_gadget_ops mv_ops = { |
1229 | 1229 | ||
@@ -1371,8 +1371,7 @@ static int mv_udc_start(struct usb_gadget *gadget, | |||
1371 | return 0; | 1371 | return 0; |
1372 | } | 1372 | } |
1373 | 1373 | ||
1374 | static int mv_udc_stop(struct usb_gadget *gadget, | 1374 | static int mv_udc_stop(struct usb_gadget *gadget) |
1375 | struct usb_gadget_driver *driver) | ||
1376 | { | 1375 | { |
1377 | struct mv_udc *udc; | 1376 | struct mv_udc *udc; |
1378 | unsigned long flags; | 1377 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c index 4641df5a8175..887bea42e5aa 100644 --- a/drivers/usb/gadget/udc/net2272.c +++ b/drivers/usb/gadget/udc/net2272.c | |||
@@ -1169,8 +1169,7 @@ net2272_pullup(struct usb_gadget *_gadget, int is_on) | |||
1169 | 1169 | ||
1170 | static int net2272_start(struct usb_gadget *_gadget, | 1170 | static int net2272_start(struct usb_gadget *_gadget, |
1171 | struct usb_gadget_driver *driver); | 1171 | struct usb_gadget_driver *driver); |
1172 | static int net2272_stop(struct usb_gadget *_gadget, | 1172 | static int net2272_stop(struct usb_gadget *_gadget); |
1173 | struct usb_gadget_driver *driver); | ||
1174 | 1173 | ||
1175 | static const struct usb_gadget_ops net2272_ops = { | 1174 | static const struct usb_gadget_ops net2272_ops = { |
1176 | .get_frame = net2272_get_frame, | 1175 | .get_frame = net2272_get_frame, |
@@ -1500,8 +1499,7 @@ stop_activity(struct net2272 *dev, struct usb_gadget_driver *driver) | |||
1500 | net2272_usb_reinit(dev); | 1499 | net2272_usb_reinit(dev); |
1501 | } | 1500 | } |
1502 | 1501 | ||
1503 | static int net2272_stop(struct usb_gadget *_gadget, | 1502 | static int net2272_stop(struct usb_gadget *_gadget) |
1504 | struct usb_gadget_driver *driver) | ||
1505 | { | 1503 | { |
1506 | struct net2272 *dev; | 1504 | struct net2272 *dev; |
1507 | unsigned long flags; | 1505 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/net2280.c b/drivers/usb/gadget/udc/net2280.c index a30df8efa2d8..bd03a1b4192d 100644 --- a/drivers/usb/gadget/udc/net2280.c +++ b/drivers/usb/gadget/udc/net2280.c | |||
@@ -1548,8 +1548,7 @@ static int net2280_pullup(struct usb_gadget *_gadget, int is_on) | |||
1548 | 1548 | ||
1549 | static int net2280_start(struct usb_gadget *_gadget, | 1549 | static int net2280_start(struct usb_gadget *_gadget, |
1550 | struct usb_gadget_driver *driver); | 1550 | struct usb_gadget_driver *driver); |
1551 | static int net2280_stop(struct usb_gadget *_gadget, | 1551 | static int net2280_stop(struct usb_gadget *_gadget); |
1552 | struct usb_gadget_driver *driver); | ||
1553 | 1552 | ||
1554 | static const struct usb_gadget_ops net2280_ops = { | 1553 | static const struct usb_gadget_ops net2280_ops = { |
1555 | .get_frame = net2280_get_frame, | 1554 | .get_frame = net2280_get_frame, |
@@ -2432,8 +2431,7 @@ static void stop_activity(struct net2280 *dev, struct usb_gadget_driver *driver) | |||
2432 | usb_reinit(dev); | 2431 | usb_reinit(dev); |
2433 | } | 2432 | } |
2434 | 2433 | ||
2435 | static int net2280_stop(struct usb_gadget *_gadget, | 2434 | static int net2280_stop(struct usb_gadget *_gadget) |
2436 | struct usb_gadget_driver *driver) | ||
2437 | { | 2435 | { |
2438 | struct net2280 *dev; | 2436 | struct net2280 *dev; |
2439 | unsigned long flags; | 2437 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/omap_udc.c b/drivers/usb/gadget/udc/omap_udc.c index dcdfea46003b..534b85c07feb 100644 --- a/drivers/usb/gadget/udc/omap_udc.c +++ b/drivers/usb/gadget/udc/omap_udc.c | |||
@@ -1311,8 +1311,7 @@ static int omap_pullup(struct usb_gadget *gadget, int is_on) | |||
1311 | 1311 | ||
1312 | static int omap_udc_start(struct usb_gadget *g, | 1312 | static int omap_udc_start(struct usb_gadget *g, |
1313 | struct usb_gadget_driver *driver); | 1313 | struct usb_gadget_driver *driver); |
1314 | static int omap_udc_stop(struct usb_gadget *g, | 1314 | static int omap_udc_stop(struct usb_gadget *g); |
1315 | struct usb_gadget_driver *driver); | ||
1316 | 1315 | ||
1317 | static const struct usb_gadget_ops omap_gadget_ops = { | 1316 | static const struct usb_gadget_ops omap_gadget_ops = { |
1318 | .get_frame = omap_get_frame, | 1317 | .get_frame = omap_get_frame, |
@@ -2102,8 +2101,7 @@ done: | |||
2102 | return status; | 2101 | return status; |
2103 | } | 2102 | } |
2104 | 2103 | ||
2105 | static int omap_udc_stop(struct usb_gadget *g, | 2104 | static int omap_udc_stop(struct usb_gadget *g) |
2106 | struct usb_gadget_driver *driver) | ||
2107 | { | 2105 | { |
2108 | unsigned long flags; | 2106 | unsigned long flags; |
2109 | int status = -ENODEV; | 2107 | int status = -ENODEV; |
diff --git a/drivers/usb/gadget/udc/pch_udc.c b/drivers/usb/gadget/udc/pch_udc.c index ccbe3d4a2a50..6534f36866dc 100644 --- a/drivers/usb/gadget/udc/pch_udc.c +++ b/drivers/usb/gadget/udc/pch_udc.c | |||
@@ -1240,8 +1240,8 @@ static int pch_udc_pcd_vbus_draw(struct usb_gadget *gadget, unsigned int mA) | |||
1240 | 1240 | ||
1241 | static int pch_udc_start(struct usb_gadget *g, | 1241 | static int pch_udc_start(struct usb_gadget *g, |
1242 | struct usb_gadget_driver *driver); | 1242 | struct usb_gadget_driver *driver); |
1243 | static int pch_udc_stop(struct usb_gadget *g, | 1243 | static int pch_udc_stop(struct usb_gadget *g); |
1244 | struct usb_gadget_driver *driver); | 1244 | |
1245 | static const struct usb_gadget_ops pch_udc_ops = { | 1245 | static const struct usb_gadget_ops pch_udc_ops = { |
1246 | .get_frame = pch_udc_pcd_get_frame, | 1246 | .get_frame = pch_udc_pcd_get_frame, |
1247 | .wakeup = pch_udc_pcd_wakeup, | 1247 | .wakeup = pch_udc_pcd_wakeup, |
@@ -3008,8 +3008,7 @@ static int pch_udc_start(struct usb_gadget *g, | |||
3008 | return 0; | 3008 | return 0; |
3009 | } | 3009 | } |
3010 | 3010 | ||
3011 | static int pch_udc_stop(struct usb_gadget *g, | 3011 | static int pch_udc_stop(struct usb_gadget *g) |
3012 | struct usb_gadget_driver *driver) | ||
3013 | { | 3012 | { |
3014 | struct pch_udc_dev *dev = to_pch_udc(g); | 3013 | struct pch_udc_dev *dev = to_pch_udc(g); |
3015 | 3014 | ||
diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c index 098fa57c3b80..2944092cd92e 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.c +++ b/drivers/usb/gadget/udc/pxa25x_udc.c | |||
@@ -998,8 +998,7 @@ static int pxa25x_udc_vbus_draw(struct usb_gadget *_gadget, unsigned mA) | |||
998 | 998 | ||
999 | static int pxa25x_udc_start(struct usb_gadget *g, | 999 | static int pxa25x_udc_start(struct usb_gadget *g, |
1000 | struct usb_gadget_driver *driver); | 1000 | struct usb_gadget_driver *driver); |
1001 | static int pxa25x_udc_stop(struct usb_gadget *g, | 1001 | static int pxa25x_udc_stop(struct usb_gadget *g); |
1002 | struct usb_gadget_driver *driver); | ||
1003 | 1002 | ||
1004 | static const struct usb_gadget_ops pxa25x_udc_ops = { | 1003 | static const struct usb_gadget_ops pxa25x_udc_ops = { |
1005 | .get_frame = pxa25x_udc_get_frame, | 1004 | .get_frame = pxa25x_udc_get_frame, |
@@ -1311,8 +1310,7 @@ stop_activity(struct pxa25x_udc *dev, struct usb_gadget_driver *driver) | |||
1311 | udc_reinit(dev); | 1310 | udc_reinit(dev); |
1312 | } | 1311 | } |
1313 | 1312 | ||
1314 | static int pxa25x_udc_stop(struct usb_gadget*g, | 1313 | static int pxa25x_udc_stop(struct usb_gadget*g) |
1315 | struct usb_gadget_driver *driver) | ||
1316 | { | 1314 | { |
1317 | struct pxa25x_udc *dev = to_pxa25x(g); | 1315 | struct pxa25x_udc *dev = to_pxa25x(g); |
1318 | 1316 | ||
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c index b90b1f308992..17a0193b5e01 100644 --- a/drivers/usb/gadget/udc/pxa27x_udc.c +++ b/drivers/usb/gadget/udc/pxa27x_udc.c | |||
@@ -1669,8 +1669,7 @@ static int pxa_udc_vbus_draw(struct usb_gadget *_gadget, unsigned mA) | |||
1669 | 1669 | ||
1670 | static int pxa27x_udc_start(struct usb_gadget *g, | 1670 | static int pxa27x_udc_start(struct usb_gadget *g, |
1671 | struct usb_gadget_driver *driver); | 1671 | struct usb_gadget_driver *driver); |
1672 | static int pxa27x_udc_stop(struct usb_gadget *g, | 1672 | static int pxa27x_udc_stop(struct usb_gadget *g); |
1673 | struct usb_gadget_driver *driver); | ||
1674 | 1673 | ||
1675 | static const struct usb_gadget_ops pxa_udc_ops = { | 1674 | static const struct usb_gadget_ops pxa_udc_ops = { |
1676 | .get_frame = pxa_udc_get_frame, | 1675 | .get_frame = pxa_udc_get_frame, |
@@ -1857,8 +1856,7 @@ static void stop_activity(struct pxa_udc *udc, struct usb_gadget_driver *driver) | |||
1857 | * | 1856 | * |
1858 | * Returns 0 if no error, -ENODEV, -EINVAL otherwise | 1857 | * Returns 0 if no error, -ENODEV, -EINVAL otherwise |
1859 | */ | 1858 | */ |
1860 | static int pxa27x_udc_stop(struct usb_gadget *g, | 1859 | static int pxa27x_udc_stop(struct usb_gadget *g) |
1861 | struct usb_gadget_driver *driver) | ||
1862 | { | 1860 | { |
1863 | struct pxa_udc *udc = to_pxa(g); | 1861 | struct pxa_udc *udc = to_pxa(g); |
1864 | 1862 | ||
diff --git a/drivers/usb/gadget/udc/r8a66597-udc.c b/drivers/usb/gadget/udc/r8a66597-udc.c index f8186613b53e..b63a527baf13 100644 --- a/drivers/usb/gadget/udc/r8a66597-udc.c +++ b/drivers/usb/gadget/udc/r8a66597-udc.c | |||
@@ -1763,8 +1763,7 @@ static int r8a66597_start(struct usb_gadget *gadget, | |||
1763 | return 0; | 1763 | return 0; |
1764 | } | 1764 | } |
1765 | 1765 | ||
1766 | static int r8a66597_stop(struct usb_gadget *gadget, | 1766 | static int r8a66597_stop(struct usb_gadget *gadget) |
1767 | struct usb_gadget_driver *driver) | ||
1768 | { | 1767 | { |
1769 | struct r8a66597 *r8a66597 = gadget_to_r8a66597(gadget); | 1768 | struct r8a66597 *r8a66597 = gadget_to_r8a66597(gadget); |
1770 | unsigned long flags; | 1769 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/s3c-hsudc.c b/drivers/usb/gadget/udc/s3c-hsudc.c index de95e9dd957f..97d3a9144381 100644 --- a/drivers/usb/gadget/udc/s3c-hsudc.c +++ b/drivers/usb/gadget/udc/s3c-hsudc.c | |||
@@ -1188,8 +1188,7 @@ err_supplies: | |||
1188 | return ret; | 1188 | return ret; |
1189 | } | 1189 | } |
1190 | 1190 | ||
1191 | static int s3c_hsudc_stop(struct usb_gadget *gadget, | 1191 | static int s3c_hsudc_stop(struct usb_gadget *gadget) |
1192 | struct usb_gadget_driver *driver) | ||
1193 | { | 1192 | { |
1194 | struct s3c_hsudc *hsudc = to_hsudc(gadget); | 1193 | struct s3c_hsudc *hsudc = to_hsudc(gadget); |
1195 | unsigned long flags; | 1194 | unsigned long flags; |
diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c index ff423d15beff..2a8e36d31488 100644 --- a/drivers/usb/gadget/udc/s3c2410_udc.c +++ b/drivers/usb/gadget/udc/s3c2410_udc.c | |||
@@ -1541,8 +1541,7 @@ static int s3c2410_vbus_draw(struct usb_gadget *_gadget, unsigned ma) | |||
1541 | 1541 | ||
1542 | static int s3c2410_udc_start(struct usb_gadget *g, | 1542 | static int s3c2410_udc_start(struct usb_gadget *g, |
1543 | struct usb_gadget_driver *driver); | 1543 | struct usb_gadget_driver *driver); |
1544 | static int s3c2410_udc_stop(struct usb_gadget *g, | 1544 | static int s3c2410_udc_stop(struct usb_gadget *g); |
1545 | struct usb_gadget_driver *driver); | ||
1546 | 1545 | ||
1547 | static const struct usb_gadget_ops s3c2410_ops = { | 1546 | static const struct usb_gadget_ops s3c2410_ops = { |
1548 | .get_frame = s3c2410_udc_get_frame, | 1547 | .get_frame = s3c2410_udc_get_frame, |
@@ -1683,8 +1682,7 @@ static int s3c2410_udc_start(struct usb_gadget *g, | |||
1683 | return 0; | 1682 | return 0; |
1684 | } | 1683 | } |
1685 | 1684 | ||
1686 | static int s3c2410_udc_stop(struct usb_gadget *g, | 1685 | static int s3c2410_udc_stop(struct usb_gadget *g) |
1687 | struct usb_gadget_driver *driver) | ||
1688 | { | 1686 | { |
1689 | struct s3c2410_udc *udc = to_s3c2410(g); | 1687 | struct s3c2410_udc *udc = to_s3c2410(g); |
1690 | 1688 | ||
diff --git a/drivers/usb/gadget/udc/udc-core.c b/drivers/usb/gadget/udc/udc-core.c index 52f457bb0bbc..135504b60425 100644 --- a/drivers/usb/gadget/udc/udc-core.c +++ b/drivers/usb/gadget/udc/udc-core.c | |||
@@ -204,7 +204,7 @@ static inline int usb_gadget_udc_start(struct usb_udc *udc) | |||
204 | */ | 204 | */ |
205 | static inline void usb_gadget_udc_stop(struct usb_udc *udc) | 205 | static inline void usb_gadget_udc_stop(struct usb_udc *udc) |
206 | { | 206 | { |
207 | udc->gadget->ops->udc_stop(udc->gadget, udc->driver); | 207 | udc->gadget->ops->udc_stop(udc->gadget); |
208 | } | 208 | } |
209 | 209 | ||
210 | /** | 210 | /** |
diff --git a/drivers/usb/gadget/udc/udc-xilinx.c b/drivers/usb/gadget/udc/udc-xilinx.c index ed27e1687a4e..1eac56fc384d 100644 --- a/drivers/usb/gadget/udc/udc-xilinx.c +++ b/drivers/usb/gadget/udc/udc-xilinx.c | |||
@@ -1403,8 +1403,7 @@ err: | |||
1403 | * | 1403 | * |
1404 | * Return: zero always | 1404 | * Return: zero always |
1405 | */ | 1405 | */ |
1406 | static int xudc_stop(struct usb_gadget *gadget, | 1406 | static int xudc_stop(struct usb_gadget *gadget) |
1407 | struct usb_gadget_driver *driver) | ||
1408 | { | 1407 | { |
1409 | struct xusb_udc *udc = to_udc(gadget); | 1408 | struct xusb_udc *udc = to_udc(gadget); |
1410 | unsigned long flags; | 1409 | unsigned long flags; |
diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 88d63e0c79f5..4ab1896957e1 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c | |||
@@ -1684,8 +1684,7 @@ static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on) | |||
1684 | 1684 | ||
1685 | static int musb_gadget_start(struct usb_gadget *g, | 1685 | static int musb_gadget_start(struct usb_gadget *g, |
1686 | struct usb_gadget_driver *driver); | 1686 | struct usb_gadget_driver *driver); |
1687 | static int musb_gadget_stop(struct usb_gadget *g, | 1687 | static int musb_gadget_stop(struct usb_gadget *g); |
1688 | struct usb_gadget_driver *driver); | ||
1689 | 1688 | ||
1690 | static const struct usb_gadget_ops musb_gadget_operations = { | 1689 | static const struct usb_gadget_ops musb_gadget_operations = { |
1691 | .get_frame = musb_gadget_get_frame, | 1690 | .get_frame = musb_gadget_get_frame, |
@@ -1923,8 +1922,7 @@ static void stop_activity(struct musb *musb, struct usb_gadget_driver *driver) | |||
1923 | * | 1922 | * |
1924 | * @param driver the gadget driver to unregister | 1923 | * @param driver the gadget driver to unregister |
1925 | */ | 1924 | */ |
1926 | static int musb_gadget_stop(struct usb_gadget *g, | 1925 | static int musb_gadget_stop(struct usb_gadget *g) |
1927 | struct usb_gadget_driver *driver) | ||
1928 | { | 1926 | { |
1929 | struct musb *musb = gadget_to_musb(g); | 1927 | struct musb *musb = gadget_to_musb(g); |
1930 | unsigned long flags; | 1928 | unsigned long flags; |
diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c index 2d17c10a0428..7a4521030505 100644 --- a/drivers/usb/renesas_usbhs/mod_gadget.c +++ b/drivers/usb/renesas_usbhs/mod_gadget.c | |||
@@ -851,8 +851,7 @@ static int usbhsg_gadget_start(struct usb_gadget *gadget, | |||
851 | return usbhsg_try_start(priv, USBHSG_STATUS_REGISTERD); | 851 | return usbhsg_try_start(priv, USBHSG_STATUS_REGISTERD); |
852 | } | 852 | } |
853 | 853 | ||
854 | static int usbhsg_gadget_stop(struct usb_gadget *gadget, | 854 | static int usbhsg_gadget_stop(struct usb_gadget *gadget) |
855 | struct usb_gadget_driver *driver) | ||
856 | { | 855 | { |
857 | struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget); | 856 | struct usbhsg_gpriv *gpriv = usbhsg_gadget_to_gpriv(gadget); |
858 | struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv); | 857 | struct usbhs_priv *priv = usbhsg_gpriv_to_priv(gpriv); |