aboutsummaryrefslogtreecommitdiffstats
path: root/sound/i2c
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-10-24 09:02:37 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:19:49 -0500
commit8433a509c0eb6bb1f33ce39c82c580b8901619ee (patch)
treef1554905dee5da4e840dfd674d5b004124496a22 /sound/i2c
parentd78bec210f07b06f406b877b9179e0cc281ae8e6 (diff)
[ALSA] Fix schedule_timeout usage
Use schedule_timeout_{,un}interruptible() instead of set_current_state()/schedule_timeout() to reduce kernel size. Also use human-time conversion functions instead of hard-coded division to avoid rounding issues. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/i2c')
-rw-r--r--sound/i2c/cs8427.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/i2c/cs8427.c b/sound/i2c/cs8427.c
index 21133eb6e881..1a05cfbdc7c6 100644
--- a/sound/i2c/cs8427.c
+++ b/sound/i2c/cs8427.c
@@ -302,8 +302,7 @@ static void snd_cs8427_reset(snd_i2c_device_t *cs8427)
302 snd_i2c_unlock(cs8427->bus); 302 snd_i2c_unlock(cs8427->bus);
303 if (!(data & CS8427_UNLOCK)) 303 if (!(data & CS8427_UNLOCK))
304 break; 304 break;
305 set_current_state(TASK_UNINTERRUPTIBLE); 305 schedule_timeout_uninterruptible(1);
306 schedule_timeout(1);
307 } 306 }
308 snd_i2c_lock(cs8427->bus); 307 snd_i2c_lock(cs8427->bus);
309 chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK; 308 chip->regmap[CS8427_REG_CLOCKSOURCE] &= ~CS8427_RXDMASK;