From cdbfeb635dca5af131e69a888e31c9f441342d95 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Wed, 16 Feb 2011 23:47:51 +0900 Subject: [PATCH] --- yaml --- r: 235327 b: refs/heads/master c: 04b31c776f34d127b422da92899272a0b8cda21d h: refs/heads/master i: 235325: f4806a53b321b3f3ee1d0a8150814463d766d518 235323: 1dbe146857869006b2816cbf6c9acb60bd70f512 235319: dcd888439f7003b72a88b18eae9958a7f24d8223 235311: 22cee55535581d41050a6493868a3d6a6ac685a7 235295: f8f4199e265c253812b710dda74540b48d4f41c2 235263: 9cf0338fb99d8b5ea082ccb9391e02cada9300f3 v: v3 --- [refs] | 2 +- trunk/drivers/usb/host/isp1362-hcd.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 138e48003ee6..393f2bd93b3f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5c8d61bfcc6396f80b884e0f23f08cbd8bf10778 +refs/heads/master: 04b31c776f34d127b422da92899272a0b8cda21d diff --git a/trunk/drivers/usb/host/isp1362-hcd.c b/trunk/drivers/usb/host/isp1362-hcd.c index 43a39eb56cc6..02b742df332a 100644 --- a/trunk/drivers/usb/host/isp1362-hcd.c +++ b/trunk/drivers/usb/host/isp1362-hcd.c @@ -226,7 +226,6 @@ static int claim_ptd_buffers(struct isp1362_ep_queue *epq, static inline void release_ptd_buffers(struct isp1362_ep_queue *epq, struct isp1362_ep *ep) { - int index = ep->ptd_index; int last = ep->ptd_index + ep->num_ptds; if (last > epq->buf_count) @@ -236,10 +235,8 @@ static inline void release_ptd_buffers(struct isp1362_ep_queue *epq, struct isp1 epq->buf_map, epq->skip_map); BUG_ON(last > epq->buf_count); - for (; index < last; index++) { - __clear_bit(index, &epq->buf_map); - __set_bit(index, &epq->skip_map); - } + bitmap_clear(&epq->buf_map, ep->ptd_index, ep->num_ptds); + bitmap_set(&epq->skip_map, ep->ptd_index, ep->num_ptds); epq->buf_avail += ep->num_ptds; epq->ptd_count--;