diff options
author | Christoph Egger <siccegge@stud.informatik.uni-erlangen.de> | 2010-02-05 07:24:12 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-02 17:54:57 -0500 |
commit | 90f7976880bbbf9968629500972f8e2f80401217 (patch) | |
tree | ac2b80ef761ce6ce328fc5a9d672c80a57c762d7 /drivers/usb | |
parent | 8e7e61dfbf1ec6418bf89505980b158a8d00d877 (diff) |
USB: Remove unsupported usb gadget drivers
A bunch of USB gadget drivers where never ported from the linux 2.4
series to 2.6 kernels. However there's some code still in the tree for
them which isn't used and is probably untested for ages.
As the chance of these drivers being forward ported is probably quite
small now it might be time to get rid of them.
Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/epautoconf.c | 11 | ||||
-rw-r--r-- | drivers/usb/gadget/f_acm.c | 8 | ||||
-rw-r--r-- | drivers/usb/gadget/f_ecm.c | 7 | ||||
-rw-r--r-- | drivers/usb/gadget/f_mass_storage.c | 8 | ||||
-rw-r--r-- | drivers/usb/gadget/f_rndis.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 8 | ||||
-rw-r--r-- | drivers/usb/gadget/gadget_chips.h | 59 | ||||
-rw-r--r-- | drivers/usb/gadget/gmidi.c | 5 | ||||
-rw-r--r-- | drivers/usb/gadget/printer.c | 18 | ||||
-rw-r--r-- | drivers/usb/gadget/u_ether.h | 7 | ||||
-rw-r--r-- | drivers/usb/gadget/zero.c | 6 |
11 files changed, 8 insertions, 133 deletions
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index 949ebe5e4c8d..65a5f94cbc04 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c | |||
@@ -265,17 +265,6 @@ struct usb_ep * __init usb_ep_autoconfig ( | |||
265 | return ep; | 265 | return ep; |
266 | } | 266 | } |
267 | 267 | ||
268 | } else if (gadget_is_sh (gadget) && USB_ENDPOINT_XFER_INT == type) { | ||
269 | /* single buffering is enough; maybe 8 byte fifo is too */ | ||
270 | ep = find_ep (gadget, "ep3in-bulk"); | ||
271 | if (ep && ep_matches (gadget, ep, desc)) | ||
272 | return ep; | ||
273 | |||
274 | } else if (gadget_is_mq11xx (gadget) && USB_ENDPOINT_XFER_INT == type) { | ||
275 | ep = find_ep (gadget, "ep1-bulk"); | ||
276 | if (ep && ep_matches (gadget, ep, desc)) | ||
277 | return ep; | ||
278 | |||
279 | #ifdef CONFIG_BLACKFIN | 268 | #ifdef CONFIG_BLACKFIN |
280 | } else if (gadget_is_musbhsfc(gadget) || gadget_is_musbhdrc(gadget)) { | 269 | } else if (gadget_is_musbhsfc(gadget) || gadget_is_musbhdrc(gadget)) { |
281 | if ((USB_ENDPOINT_XFER_BULK == type) || | 270 | if ((USB_ENDPOINT_XFER_BULK == type) || |
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/f_acm.c index d10353d46b86..e49c7325dce2 100644 --- a/drivers/usb/gadget/f_acm.c +++ b/drivers/usb/gadget/f_acm.c | |||
@@ -702,14 +702,6 @@ acm_unbind(struct usb_configuration *c, struct usb_function *f) | |||
702 | /* Some controllers can't support CDC ACM ... */ | 702 | /* Some controllers can't support CDC ACM ... */ |
703 | static inline bool can_support_cdc(struct usb_configuration *c) | 703 | static inline bool can_support_cdc(struct usb_configuration *c) |
704 | { | 704 | { |
705 | /* SH3 doesn't support multiple interfaces */ | ||
706 | if (gadget_is_sh(c->cdev->gadget)) | ||
707 | return false; | ||
708 | |||
709 | /* sa1100 doesn't have a third interrupt endpoint */ | ||
710 | if (gadget_is_sa1100(c->cdev->gadget)) | ||
711 | return false; | ||
712 | |||
713 | /* everything else is *probably* fine ... */ | 705 | /* everything else is *probably* fine ... */ |
714 | return true; | 706 | return true; |
715 | } | 707 | } |
diff --git a/drivers/usb/gadget/f_ecm.c b/drivers/usb/gadget/f_ecm.c index ecf5bdd0ae06..2fff530efc19 100644 --- a/drivers/usb/gadget/f_ecm.c +++ b/drivers/usb/gadget/f_ecm.c | |||
@@ -497,12 +497,9 @@ static int ecm_set_alt(struct usb_function *f, unsigned intf, unsigned alt) | |||
497 | struct net_device *net; | 497 | struct net_device *net; |
498 | 498 | ||
499 | /* Enable zlps by default for ECM conformance; | 499 | /* Enable zlps by default for ECM conformance; |
500 | * override for musb_hdrc (avoids txdma ovhead) | 500 | * override for musb_hdrc (avoids txdma ovhead). |
501 | * and sa1100 (can't). | ||
502 | */ | 501 | */ |
503 | ecm->port.is_zlp_ok = !( | 502 | ecm->port.is_zlp_ok = !(gadget_is_musbhdrc(cdev->gadget) |
504 | gadget_is_sa1100(cdev->gadget) | ||
505 | || gadget_is_musbhdrc(cdev->gadget) | ||
506 | ); | 503 | ); |
507 | ecm->port.cdc_filter = DEFAULT_FILTER; | 504 | ecm->port.cdc_filter = DEFAULT_FILTER; |
508 | DBG(cdev, "activate ecm\n"); | 505 | DBG(cdev, "activate ecm\n"); |
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/f_mass_storage.c index e6abde39857d..b1935fe156a0 100644 --- a/drivers/usb/gadget/f_mass_storage.c +++ b/drivers/usb/gadget/f_mass_storage.c | |||
@@ -2776,10 +2776,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common, | |||
2776 | if (cfg->release != 0xffff) { | 2776 | if (cfg->release != 0xffff) { |
2777 | i = cfg->release; | 2777 | i = cfg->release; |
2778 | } else { | 2778 | } else { |
2779 | /* The sa1100 controller is not supported */ | 2779 | i = usb_gadget_controller_number(gadget); |
2780 | i = gadget_is_sa1100(gadget) | ||
2781 | ? -1 | ||
2782 | : usb_gadget_controller_number(gadget); | ||
2783 | if (i >= 0) { | 2780 | if (i >= 0) { |
2784 | i = 0x0300 + i; | 2781 | i = 0x0300 + i; |
2785 | } else { | 2782 | } else { |
@@ -2804,8 +2801,7 @@ static struct fsg_common *fsg_common_init(struct fsg_common *common, | |||
2804 | * disable stalls. | 2801 | * disable stalls. |
2805 | */ | 2802 | */ |
2806 | common->can_stall = cfg->can_stall && | 2803 | common->can_stall = cfg->can_stall && |
2807 | !(gadget_is_sh(common->gadget) || | 2804 | !(gadget_is_at91(common->gadget)); |
2808 | gadget_is_at91(common->gadget)); | ||
2809 | 2805 | ||
2810 | 2806 | ||
2811 | spin_lock_init(&common->lock); | 2807 | spin_lock_init(&common->lock); |
diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/f_rndis.c index 95dae4c1ea40..a30e60c7f129 100644 --- a/drivers/usb/gadget/f_rndis.c +++ b/drivers/usb/gadget/f_rndis.c | |||
@@ -769,10 +769,6 @@ rndis_unbind(struct usb_configuration *c, struct usb_function *f) | |||
769 | /* Some controllers can't support RNDIS ... */ | 769 | /* Some controllers can't support RNDIS ... */ |
770 | static inline bool can_support_rndis(struct usb_configuration *c) | 770 | static inline bool can_support_rndis(struct usb_configuration *c) |
771 | { | 771 | { |
772 | /* only two endpoints on sa1100 */ | ||
773 | if (gadget_is_sa1100(c->cdev->gadget)) | ||
774 | return false; | ||
775 | |||
776 | /* everything else is *presumably* fine */ | 772 | /* everything else is *presumably* fine */ |
777 | return true; | 773 | return true; |
778 | } | 774 | } |
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 29dfb0277ffb..a90dd2db0488 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -3208,15 +3208,11 @@ static int __init check_parameters(struct fsg_dev *fsg) | |||
3208 | * halt bulk endpoints correctly. If one of them is present, | 3208 | * halt bulk endpoints correctly. If one of them is present, |
3209 | * disable stalls. | 3209 | * disable stalls. |
3210 | */ | 3210 | */ |
3211 | if (gadget_is_sh(fsg->gadget) || gadget_is_at91(fsg->gadget)) | 3211 | if (gadget_is_at91(fsg->gadget)) |
3212 | mod_data.can_stall = 0; | 3212 | mod_data.can_stall = 0; |
3213 | 3213 | ||
3214 | if (mod_data.release == 0xffff) { // Parameter wasn't set | 3214 | if (mod_data.release == 0xffff) { // Parameter wasn't set |
3215 | /* The sa1100 controller is not supported */ | 3215 | gcnum = usb_gadget_controller_number(fsg->gadget); |
3216 | if (gadget_is_sa1100(fsg->gadget)) | ||
3217 | gcnum = -1; | ||
3218 | else | ||
3219 | gcnum = usb_gadget_controller_number(fsg->gadget); | ||
3220 | if (gcnum >= 0) | 3216 | if (gcnum >= 0) |
3221 | mod_data.release = 0x0300 + gcnum; | 3217 | mod_data.release = 0x0300 + gcnum; |
3222 | else { | 3218 | else { |
diff --git a/drivers/usb/gadget/gadget_chips.h b/drivers/usb/gadget/gadget_chips.h index f2d270b202f2..1edbc12fff18 100644 --- a/drivers/usb/gadget/gadget_chips.h +++ b/drivers/usb/gadget/gadget_chips.h | |||
@@ -45,46 +45,18 @@ | |||
45 | #define gadget_is_goku(g) 0 | 45 | #define gadget_is_goku(g) 0 |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | /* SH3 UDC -- not yet ported 2.4 --> 2.6 */ | ||
49 | #ifdef CONFIG_USB_GADGET_SUPERH | ||
50 | #define gadget_is_sh(g) !strcmp("sh_udc", (g)->name) | ||
51 | #else | ||
52 | #define gadget_is_sh(g) 0 | ||
53 | #endif | ||
54 | |||
55 | /* not yet stable on 2.6 (would help "original Zaurus") */ | ||
56 | #ifdef CONFIG_USB_GADGET_SA1100 | ||
57 | #define gadget_is_sa1100(g) !strcmp("sa1100_udc", (g)->name) | ||
58 | #else | ||
59 | #define gadget_is_sa1100(g) 0 | ||
60 | #endif | ||
61 | |||
62 | #ifdef CONFIG_USB_GADGET_LH7A40X | 48 | #ifdef CONFIG_USB_GADGET_LH7A40X |
63 | #define gadget_is_lh7a40x(g) !strcmp("lh7a40x_udc", (g)->name) | 49 | #define gadget_is_lh7a40x(g) !strcmp("lh7a40x_udc", (g)->name) |
64 | #else | 50 | #else |
65 | #define gadget_is_lh7a40x(g) 0 | 51 | #define gadget_is_lh7a40x(g) 0 |
66 | #endif | 52 | #endif |
67 | 53 | ||
68 | /* handhelds.org tree (?) */ | ||
69 | #ifdef CONFIG_USB_GADGET_MQ11XX | ||
70 | #define gadget_is_mq11xx(g) !strcmp("mq11xx_udc", (g)->name) | ||
71 | #else | ||
72 | #define gadget_is_mq11xx(g) 0 | ||
73 | #endif | ||
74 | |||
75 | #ifdef CONFIG_USB_GADGET_OMAP | 54 | #ifdef CONFIG_USB_GADGET_OMAP |
76 | #define gadget_is_omap(g) !strcmp("omap_udc", (g)->name) | 55 | #define gadget_is_omap(g) !strcmp("omap_udc", (g)->name) |
77 | #else | 56 | #else |
78 | #define gadget_is_omap(g) 0 | 57 | #define gadget_is_omap(g) 0 |
79 | #endif | 58 | #endif |
80 | 59 | ||
81 | /* not yet ported 2.4 --> 2.6 */ | ||
82 | #ifdef CONFIG_USB_GADGET_N9604 | ||
83 | #define gadget_is_n9604(g) !strcmp("n9604_udc", (g)->name) | ||
84 | #else | ||
85 | #define gadget_is_n9604(g) 0 | ||
86 | #endif | ||
87 | |||
88 | /* various unstable versions available */ | 60 | /* various unstable versions available */ |
89 | #ifdef CONFIG_USB_GADGET_PXA27X | 61 | #ifdef CONFIG_USB_GADGET_PXA27X |
90 | #define gadget_is_pxa27x(g) !strcmp("pxa27x_udc", (g)->name) | 62 | #define gadget_is_pxa27x(g) !strcmp("pxa27x_udc", (g)->name) |
@@ -122,14 +94,6 @@ | |||
122 | #define gadget_is_fsl_usb2(g) 0 | 94 | #define gadget_is_fsl_usb2(g) 0 |
123 | #endif | 95 | #endif |
124 | 96 | ||
125 | /* Mentor high speed function controller */ | ||
126 | /* from Montavista kernel (?) */ | ||
127 | #ifdef CONFIG_USB_GADGET_MUSBHSFC | ||
128 | #define gadget_is_musbhsfc(g) !strcmp("musbhsfc_udc", (g)->name) | ||
129 | #else | ||
130 | #define gadget_is_musbhsfc(g) 0 | ||
131 | #endif | ||
132 | |||
133 | /* Mentor high speed "dual role" controller, in peripheral role */ | 97 | /* Mentor high speed "dual role" controller, in peripheral role */ |
134 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC | 98 | #ifdef CONFIG_USB_GADGET_MUSB_HDRC |
135 | #define gadget_is_musbhdrc(g) !strcmp("musb_hdrc", (g)->name) | 99 | #define gadget_is_musbhdrc(g) !strcmp("musb_hdrc", (g)->name) |
@@ -143,13 +107,6 @@ | |||
143 | #define gadget_is_langwell(g) 0 | 107 | #define gadget_is_langwell(g) 0 |
144 | #endif | 108 | #endif |
145 | 109 | ||
146 | /* from Montavista kernel (?) */ | ||
147 | #ifdef CONFIG_USB_GADGET_MPC8272 | ||
148 | #define gadget_is_mpc8272(g) !strcmp("mpc8272_udc", (g)->name) | ||
149 | #else | ||
150 | #define gadget_is_mpc8272(g) 0 | ||
151 | #endif | ||
152 | |||
153 | #ifdef CONFIG_USB_GADGET_M66592 | 110 | #ifdef CONFIG_USB_GADGET_M66592 |
154 | #define gadget_is_m66592(g) !strcmp("m66592_udc", (g)->name) | 111 | #define gadget_is_m66592(g) !strcmp("m66592_udc", (g)->name) |
155 | #else | 112 | #else |
@@ -203,20 +160,12 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) | |||
203 | return 0x02; | 160 | return 0x02; |
204 | else if (gadget_is_pxa(gadget)) | 161 | else if (gadget_is_pxa(gadget)) |
205 | return 0x03; | 162 | return 0x03; |
206 | else if (gadget_is_sh(gadget)) | ||
207 | return 0x04; | ||
208 | else if (gadget_is_sa1100(gadget)) | ||
209 | return 0x05; | ||
210 | else if (gadget_is_goku(gadget)) | 163 | else if (gadget_is_goku(gadget)) |
211 | return 0x06; | 164 | return 0x06; |
212 | else if (gadget_is_mq11xx(gadget)) | ||
213 | return 0x07; | ||
214 | else if (gadget_is_omap(gadget)) | 165 | else if (gadget_is_omap(gadget)) |
215 | return 0x08; | 166 | return 0x08; |
216 | else if (gadget_is_lh7a40x(gadget)) | 167 | else if (gadget_is_lh7a40x(gadget)) |
217 | return 0x09; | 168 | return 0x09; |
218 | else if (gadget_is_n9604(gadget)) | ||
219 | return 0x10; | ||
220 | else if (gadget_is_pxa27x(gadget)) | 169 | else if (gadget_is_pxa27x(gadget)) |
221 | return 0x11; | 170 | return 0x11; |
222 | else if (gadget_is_s3c2410(gadget)) | 171 | else if (gadget_is_s3c2410(gadget)) |
@@ -225,12 +174,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget) | |||
225 | return 0x13; | 174 | return 0x13; |
226 | else if (gadget_is_imx(gadget)) | 175 | else if (gadget_is_imx(gadget)) |
227 | return 0x14; | 176 | return 0x14; |
228 | else if (gadget_is_musbhsfc(gadget)) | ||
229 | return 0x15; | ||
230 | else if (gadget_is_musbhdrc(gadget)) | 177 | else if (gadget_is_musbhdrc(gadget)) |
231 | return 0x16; | 178 | return 0x16; |
232 | else if (gadget_is_mpc8272(gadget)) | ||
233 | return 0x17; | ||
234 | else if (gadget_is_atmel_usba(gadget)) | 179 | else if (gadget_is_atmel_usba(gadget)) |
235 | return 0x18; | 180 | return 0x18; |
236 | else if (gadget_is_fsl_usb2(gadget)) | 181 | else if (gadget_is_fsl_usb2(gadget)) |
@@ -265,10 +210,6 @@ static inline bool gadget_supports_altsettings(struct usb_gadget *gadget) | |||
265 | if (gadget_is_pxa27x(gadget)) | 210 | if (gadget_is_pxa27x(gadget)) |
266 | return false; | 211 | return false; |
267 | 212 | ||
268 | /* SH3 hardware just doesn't do altsettings */ | ||
269 | if (gadget_is_sh(gadget)) | ||
270 | return false; | ||
271 | |||
272 | /* Everything else is *presumably* fine ... */ | 213 | /* Everything else is *presumably* fine ... */ |
273 | return true; | 214 | return true; |
274 | } | 215 | } |
diff --git a/drivers/usb/gadget/gmidi.c b/drivers/usb/gadget/gmidi.c index 5f6a2e0a9357..04f6224b7e06 100644 --- a/drivers/usb/gadget/gmidi.c +++ b/drivers/usb/gadget/gmidi.c | |||
@@ -618,11 +618,6 @@ gmidi_set_config(struct gmidi_device *dev, unsigned number, gfp_t gfp_flags) | |||
618 | } | 618 | } |
619 | #endif | 619 | #endif |
620 | 620 | ||
621 | if (gadget_is_sa1100(gadget) && dev->config) { | ||
622 | /* tx fifo is full, but we can't clear it...*/ | ||
623 | ERROR(dev, "can't change configurations\n"); | ||
624 | return -ESPIPE; | ||
625 | } | ||
626 | gmidi_reset_config(dev); | 621 | gmidi_reset_config(dev); |
627 | 622 | ||
628 | switch (number) { | 623 | switch (number) { |
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 2d867fd22413..6b8bf8c781c4 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -949,12 +949,6 @@ printer_set_config(struct printer_dev *dev, unsigned number) | |||
949 | int result = 0; | 949 | int result = 0; |
950 | struct usb_gadget *gadget = dev->gadget; | 950 | struct usb_gadget *gadget = dev->gadget; |
951 | 951 | ||
952 | if (gadget_is_sa1100(gadget) && dev->config) { | ||
953 | /* tx fifo is full, but we can't clear it...*/ | ||
954 | INFO(dev, "can't change configurations\n"); | ||
955 | return -ESPIPE; | ||
956 | } | ||
957 | |||
958 | switch (number) { | 952 | switch (number) { |
959 | case DEV_CONFIG_VALUE: | 953 | case DEV_CONFIG_VALUE: |
960 | result = 0; | 954 | result = 0; |
@@ -1033,12 +1027,6 @@ set_interface(struct printer_dev *dev, unsigned number) | |||
1033 | { | 1027 | { |
1034 | int result = 0; | 1028 | int result = 0; |
1035 | 1029 | ||
1036 | if (gadget_is_sa1100(dev->gadget) && dev->interface < 0) { | ||
1037 | /* tx fifo is full, but we can't clear it...*/ | ||
1038 | INFO(dev, "can't change interfaces\n"); | ||
1039 | return -ESPIPE; | ||
1040 | } | ||
1041 | |||
1042 | /* Free the current interface */ | 1030 | /* Free the current interface */ |
1043 | switch (dev->interface) { | 1031 | switch (dev->interface) { |
1044 | case PRINTER_INTERFACE: | 1032 | case PRINTER_INTERFACE: |
@@ -1392,12 +1380,6 @@ printer_bind(struct usb_gadget *gadget) | |||
1392 | goto fail; | 1380 | goto fail; |
1393 | } | 1381 | } |
1394 | 1382 | ||
1395 | if (gadget_is_sa1100(gadget)) { | ||
1396 | /* hardware can't write zero length packets. */ | ||
1397 | ERROR(dev, "SA1100 controller is unsupport by this driver\n"); | ||
1398 | goto fail; | ||
1399 | } | ||
1400 | |||
1401 | gcnum = usb_gadget_controller_number(gadget); | 1383 | gcnum = usb_gadget_controller_number(gadget); |
1402 | if (gcnum >= 0) { | 1384 | if (gcnum >= 0) { |
1403 | device_desc.bcdDevice = cpu_to_le16(0x0200 + gcnum); | 1385 | device_desc.bcdDevice = cpu_to_le16(0x0200 + gcnum); |
diff --git a/drivers/usb/gadget/u_ether.h b/drivers/usb/gadget/u_ether.h index fd55f450bc0e..3c8c0c9f9d72 100644 --- a/drivers/usb/gadget/u_ether.h +++ b/drivers/usb/gadget/u_ether.h | |||
@@ -93,13 +93,6 @@ static inline bool can_support_ecm(struct usb_gadget *gadget) | |||
93 | if (!gadget_supports_altsettings(gadget)) | 93 | if (!gadget_supports_altsettings(gadget)) |
94 | return false; | 94 | return false; |
95 | 95 | ||
96 | /* SA1100 can do ECM, *without* status endpoint ... but we'll | ||
97 | * only use it in non-ECM mode for backwards compatibility | ||
98 | * (and since we currently require a status endpoint) | ||
99 | */ | ||
100 | if (gadget_is_sa1100(gadget)) | ||
101 | return false; | ||
102 | |||
103 | /* Everything else is *presumably* fine ... but this is a bit | 96 | /* Everything else is *presumably* fine ... but this is a bit |
104 | * chancy, so be **CERTAIN** there are no hardware issues with | 97 | * chancy, so be **CERTAIN** there are no hardware issues with |
105 | * your controller. Add it above if it can't handle CDC. | 98 | * your controller. Add it above if it can't handle CDC. |
diff --git a/drivers/usb/gadget/zero.c b/drivers/usb/gadget/zero.c index 2d772401b7ad..fac81ee193dd 100644 --- a/drivers/usb/gadget/zero.c +++ b/drivers/usb/gadget/zero.c | |||
@@ -297,12 +297,10 @@ static int __init zero_bind(struct usb_composite_dev *cdev) | |||
297 | */ | 297 | */ |
298 | if (loopdefault) { | 298 | if (loopdefault) { |
299 | loopback_add(cdev, autoresume != 0); | 299 | loopback_add(cdev, autoresume != 0); |
300 | if (!gadget_is_sh(gadget)) | 300 | sourcesink_add(cdev, autoresume != 0); |
301 | sourcesink_add(cdev, autoresume != 0); | ||
302 | } else { | 301 | } else { |
303 | sourcesink_add(cdev, autoresume != 0); | 302 | sourcesink_add(cdev, autoresume != 0); |
304 | if (!gadget_is_sh(gadget)) | 303 | loopback_add(cdev, autoresume != 0); |
305 | loopback_add(cdev, autoresume != 0); | ||
306 | } | 304 | } |
307 | 305 | ||
308 | gcnum = usb_gadget_controller_number(gadget); | 306 | gcnum = usb_gadget_controller_number(gadget); |