From 98e3b3393ff25f79399dd7cdcf6450788788acae Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Wed, 11 Apr 2012 20:36:53 +0900 Subject: [PATCH] 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: Akinobu Mita Acked-by: Sekhar Nori Cc: Sekhar Nori Cc: Christian Riesch Cc: Kevin Hilman Cc: davinci-linux-open-source@linux.davincidsp.com Cc: Russell King Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Sekhar Nori --- arch/arm/mach-davinci/dma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-davinci/dma.c b/arch/arm/mach-davinci/dma.c index fd33919c95d4..95ce019c9b98 100644 --- a/arch/arm/mach-davinci/dma.c +++ b/arch/arm/mach-davinci/dma.c @@ -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; -- 2.39.5