Title: [6848] branches/2009R1/sound/soc/blackfin/bf5xx-ac97.c: bug[#2424]put limitation on cmd_count to avoid exceeding
Revision
6848
Author
cliff
Date
2009-06-24 21:14:06 -0500 (Wed, 24 Jun 2009)

Log Message

bug[#2424]put limitation on cmd_count to avoid exceeding

Modified Paths

Diff

Modified: branches/2009R1/sound/soc/blackfin/bf5xx-ac97.c (6847 => 6848)


--- branches/2009R1/sound/soc/blackfin/bf5xx-ac97.c	2009-06-25 02:11:04 UTC (rev 6847)
+++ branches/2009R1/sound/soc/blackfin/bf5xx-ac97.c	2009-06-25 02:14:06 UTC (rev 6848)
@@ -153,6 +153,8 @@
 	nextwrite[cmd_count[nextfrag]].ac97_addr = addr;
 	nextwrite[cmd_count[nextfrag]].ac97_data = data;
 	++cmd_count[nextfrag];
+        if (cmd_count[nextfrag] >= sport->tx_fragsize/sizeof(struct ac97_frame))
+            cmd_count[nextfrag] = 0;
 	pr_debug("ac97_sport: Inserting %02x/%04x into fragment %d\n",
 			addr >> 8, data, nextfrag);
 }
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to