Skip to contentSkip to conversation

ARM: S3C24XX DMA resume regression fix

PATCH New Gusakov Andrey 2 participants 2 messages Mar 1, 2012 – Mar 2, 2012 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#1 lore raw

PATCH v3 1/1 ARM: S3C24XX DMA resume regression fix

In reply to a message not in the archive

s3c2410_dma_suspend suspends channels from 0 to dma_channels. s3c2410_dma_resume resumes channels in reverse order. So pointer should be decremented instead of being incremented.

---
 arch/arm/plat-s3c24xx/dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s3c24xx/dma.c +1 -1
index 57abec9..16510d5 100644
@@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void)
 	struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1;
 	int channel;
 
-	for (channel = dma_channels - 1; channel >= 0; cp++, channel--)
+	for (channel = dma_channels - 1; channel >= 0; cp--, channel--)
 		s3c2410_dma_resume_chan(cp);
 }
 
Signature · 1 line
1.7.0.4
Applied
#2 lore raw

PATCH v3 1/1 ARM: S3C24XX DMA resume regression fix

Quoted 15 lines · Gusakov Andrey

s3c2410_dma_suspend suspends channels from 0 to dma_channels. s3c2410_dma_resume resumes channels in reverse order. So pointer should be decremented instead of being incremented.

---
  arch/arm/plat-s3c24xx/dma.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-s3c24xx/dma.c +0 -0
index 57abec9..16510d5 100644

arch/arm/plat-s3c24xx/dma.c static void s3c2410_dma_resume(void) · line 1255

Quoted 8 lines
arch/arm/plat-s3c24xx/dma.c +1 -1
@@ -1249,7 +1249,7 @@ static void s3c2410_dma_resume(void)
  	struct s3c2410_dma_chan *cp = s3c2410_chans + dma_channels - 1;
  	int channel;
 
-	for (channel = dma_channels - 1; channel>= 0; cp++, channel--)
+	for (channel = dma_channels - 1; channel>= 0; cp--, channel--)
  		s3c2410_dma_resume_chan(cp);
  }
 

Applied, thanks.

Best regards,
Kgene.
--
Kukjin Kim <[email protected]>, Senior Engineer, SW Solution Development Team, Samsung Electronics Co., Ltd.