summaryrefslogtreecommitdiffstats
path: root/drivers/dma/fsldma.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-03-10 16:34:43 +0100
committerIngo Molnar <mingo@elte.hu>2009-03-10 16:34:43 +0100
commit8c54436ae9f59146b3d02820a3ebbf71e61f2aee (patch)
tree0ab1a3847809bd7d5f44fc52b1f16fabd953c4bb /drivers/dma/fsldma.c
parentsched: TIF_NEED_RESCHED -> need_reshed() cleanup (diff)
parentMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drz... (diff)
downloadlinux-8c54436ae9f59146b3d02820a3ebbf71e61f2aee.tar.xz
linux-8c54436ae9f59146b3d02820a3ebbf71e61f2aee.zip
Merge branches 'sched/cleanups' and 'linus' into sched/core
Diffstat (limited to 'drivers/dma/fsldma.c')
-rw-r--r--drivers/dma/fsldma.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/dma/fsldma.c b/drivers/dma/fsldma.c
index 70126a606239..86d6da47f558 100644
--- a/drivers/dma/fsldma.c
+++ b/drivers/dma/fsldma.c
@@ -158,7 +158,8 @@ static void dma_start(struct fsl_dma_chan *fsl_chan)
static void dma_halt(struct fsl_dma_chan *fsl_chan)
{
- int i = 0;
+ int i;
+
DMA_OUT(fsl_chan, &fsl_chan->reg_base->mr,
DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32) | FSL_DMA_MR_CA,
32);
@@ -166,8 +167,11 @@ static void dma_halt(struct fsl_dma_chan *fsl_chan)
DMA_IN(fsl_chan, &fsl_chan->reg_base->mr, 32) & ~(FSL_DMA_MR_CS
| FSL_DMA_MR_EMS_EN | FSL_DMA_MR_CA), 32);
- while (!dma_is_idle(fsl_chan) && (i++ < 100))
+ for (i = 0; i < 100; i++) {
+ if (dma_is_idle(fsl_chan))
+ break;
udelay(10);
+ }
if (i >= 100 && !dma_is_idle(fsl_chan))
dev_err(fsl_chan->dev, "DMA halt timeout!\n");
}