summaryrefslogtreecommitdiff
path: root/drivers/usb/host/isp1362-hcd.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2011-02-16 23:47:51 +0900
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-17 11:00:24 -0800
commit04b31c776f34d127b422da92899272a0b8cda21d (patch)
tree1ec5d989e4630e1d347bc08c0e0d8091f40ae956 /drivers/usb/host/isp1362-hcd.c
parent5c8d61bfcc6396f80b884e0f23f08cbd8bf10778 (diff)
usb: isp1362-hcd: use bitmap_clear() and bitmap_set()
Use bitmap_set()/bitmap_clear() to fill/zero a region of a bitmap instead of doing set_bit()/clear_bit() each bit. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/isp1362-hcd.c')
-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,
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--;