[ALSA] ad1848: Fix msleep while atomic
authorTrent Piepho <xyzzy@speakeasy.org>
Wed, 19 Sep 2007 19:19:57 +0000 (21:19 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Oct 2007 14:50:58 +0000 (16:50 +0200)
Simplest fix.
Acked-by: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/isa/ad1848/ad1848_lib.c

index 330b5ced01aad6ba467ab2ab7432c479e0ac259f..18355fd66cb5eecc07334a772cc2d763ad3f9ab7 100644 (file)
@@ -236,7 +236,9 @@ static void snd_ad1848_mce_down(struct snd_ad1848 *chip)
         * calibration process to start. Needs upto 5 sample periods on AD1848
         * which at the slowest possible rate of 5.5125 kHz means 907 us.
         */
+       spin_unlock_irqrestore(&chip->reg_lock, flags);
        msleep(1);
+       spin_lock_irqsave(&chip->reg_lock, flags);
 
        snd_printdd("(2) jiffies = %lu\n", jiffies);