aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/host/isp1362-hcd.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/host/isp1362-hcd.c b/drivers/usb/host/isp1362-hcd.c
index 43a39eb56cc6..02b742df332a 100644
--- a/drivers/usb/host/isp1362-hcd.c
+++ b/drivers/usb/host/isp1362-hcd.c
@@ -226,7 +226,6 @@ static int claim_ptd_buffers(struct isp1362_ep_queue *epq,
226 226
227static inline void release_ptd_buffers(struct isp1362_ep_queue *epq, struct isp1362_ep *ep) 227static inline void release_ptd_buffers(struct isp1362_ep_queue *epq, struct isp1362_ep *ep)
228{ 228{
229 int index = ep->ptd_index;
230 int last = ep->ptd_index + ep->num_ptds; 229 int last = ep->ptd_index + ep->num_ptds;
231 230
232 if (last > epq->buf_count) 231 if (last > epq->buf_count)
@@ -236,10 +235,8 @@ static inline void release_ptd_buffers(struct isp1362_ep_queue *epq, struct isp1
236 epq->buf_map, epq->skip_map); 235 epq->buf_map, epq->skip_map);
237 BUG_ON(last > epq->buf_count); 236 BUG_ON(last > epq->buf_count);
238 237
239 for (; index < last; index++) { 238 bitmap_clear(&epq->buf_map, ep->ptd_index, ep->num_ptds);
240 __clear_bit(index, &epq->buf_map); 239 bitmap_set(&epq->skip_map, ep->ptd_index, ep->num_ptds);
241 __set_bit(index, &epq->skip_map);
242 }
243 epq->buf_avail += ep->num_ptds; 240 epq->buf_avail += ep->num_ptds;
244 epq->ptd_count--; 241 epq->ptd_count--;
245 242