Commit 98e3b339 authored by Akinobu Mita's avatar Akinobu Mita Committed by Sekhar Nori

arm: davinci: use for_each_set_bit_from

Use for_each_set_bit_from to iterate over all the set bit in a memory
region.
Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Acked-by: default avatarSekhar Nori <nsekhar@ti.com>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Christian Riesch <christian.riesch@omicron.at>
Cc: Kevin Hilman <khilman@ti.com>
Cc: davinci-linux-open-source@linux.davincidsp.com
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
parent 59858b71
......@@ -557,9 +557,9 @@ static int reserve_contiguous_slots(int ctlr, unsigned int id,
if (i == edma_cc[ctlr]->num_slots)
stop_slot = i;
for (j = start_slot; j < stop_slot; j++)
if (test_bit(j, tmp_inuse))
clear_bit(j, edma_cc[ctlr]->edma_inuse);
j = start_slot;
for_each_set_bit_from(j, tmp_inuse, stop_slot)
clear_bit(j, edma_cc[ctlr]->edma_inuse);
if (count)
return -EBUSY;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment