From: Arjan van de Ven Date: Wed, 9 Apr 2008 00:41:55 +0000 (-0700) Subject: es1968: fix sleep-while-holding-lock bug X-Git-Tag: v2.6.25-rc9~41 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b47c971dc947cadecc20dc7681037e96ece520e;p=pandora-kernel.git es1968: fix sleep-while-holding-lock bug snd_es1968_ac97_read() calls snd_es1968_ac97_wait() first outside a locked area, and later, while holding a lock. snd_es1968_ac97_wait() has a polling loop with a cond_resched() inside it.. which sleeps, so the second call is invalid. This patch adds a version of the wait function that just pure polls. While this is not very elegant in principle, it's very likely the easiest thing to do here, we already checked if the chip was ready (while yielding) just before, so it is very unlikely to take a long time here. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Arjan van de Ven Cc: Jaroslav Kysela Cc: Takashi Iwai Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed