diff options
author | Michal Nazarewicz <mina86@mina86.com> | 2011-11-19 12:27:37 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2011-12-12 04:45:11 -0500 |
commit | d327ab5b6d660d6fe22b073b743fde1668e593bb (patch) | |
tree | f32166a8a1bf562f6e235a2ce1b6ec0a6fead6ae /drivers/usb/gadget/epautoconf.c | |
parent | 7aac8d1537b1fd1a9e39bd16edcd6728c19f8dd5 (diff) |
usb: gadget: replace usb_gadget::is_dualspeed with max_speed
This commit replaces usb_gadget's is_dualspeed field with
a max_speed field.
[ balbi@ti.com : Fixed DWC3 driver ]
Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/epautoconf.c')
-rw-r--r-- | drivers/usb/gadget/epautoconf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c index 596a0b464e61..38bcbfb91f62 100644 --- a/drivers/usb/gadget/epautoconf.c +++ b/drivers/usb/gadget/epautoconf.c | |||
@@ -152,7 +152,7 @@ ep_matches ( | |||
152 | switch (type) { | 152 | switch (type) { |
153 | case USB_ENDPOINT_XFER_INT: | 153 | case USB_ENDPOINT_XFER_INT: |
154 | /* INT: limit 64 bytes full speed, 1024 high/super speed */ | 154 | /* INT: limit 64 bytes full speed, 1024 high/super speed */ |
155 | if (!gadget->is_dualspeed && max > 64) | 155 | if (!gadget_is_dualspeed(gadget) && max > 64) |
156 | return 0; | 156 | return 0; |
157 | /* FALLTHROUGH */ | 157 | /* FALLTHROUGH */ |
158 | 158 | ||
@@ -160,12 +160,12 @@ ep_matches ( | |||
160 | /* ISO: limit 1023 bytes full speed, 1024 high/super speed */ | 160 | /* ISO: limit 1023 bytes full speed, 1024 high/super speed */ |
161 | if (ep->maxpacket < max) | 161 | if (ep->maxpacket < max) |
162 | return 0; | 162 | return 0; |
163 | if (!gadget->is_dualspeed && max > 1023) | 163 | if (!gadget_is_dualspeed(gadget) && max > 1023) |
164 | return 0; | 164 | return 0; |
165 | 165 | ||
166 | /* BOTH: "high bandwidth" works only at high speed */ | 166 | /* BOTH: "high bandwidth" works only at high speed */ |
167 | if ((desc->wMaxPacketSize & cpu_to_le16(3<<11))) { | 167 | if ((desc->wMaxPacketSize & cpu_to_le16(3<<11))) { |
168 | if (!gadget->is_dualspeed) | 168 | if (!gadget_is_dualspeed(gadget)) |
169 | return 0; | 169 | return 0; |
170 | /* configure your hardware with enough buffering!! */ | 170 | /* configure your hardware with enough buffering!! */ |
171 | } | 171 | } |