]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm8996: ensure lower bounds of 1 for timeout
authorNicholas Mc Guire <hofrat@osadl.org>
Sun, 8 Mar 2015 10:02:38 +0000 (06:02 -0400)
committerMark Brown <broonie@kernel.org>
Mon, 9 Mar 2015 18:15:56 +0000 (18:15 +0000)
commit36841fc889569f3f80c6c2389a6cdc2b1fc5d0e0
tree2f3bbaafa26f4ee7e1a0cc2ccb9967eaf874ac18
parent0c71ee89e8a6fc065df305897a5931811236dfb7
ASoC: wm8996: ensure lower bounds of 1 for timeout

wait_for_completion_timeout can be called with timeout == 0 due to
msecs_to_jiffies(2) == 1 for HZ < 1000 and usecs_to_jiffies(300) == 1
for all reasonable values of HZ, thus the following timeout /= 2; sets
timeout to 0. This patch simply adds a lower-bounds of 1.

Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm8996.c