X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sound%2Fisa%2Fad1848%2Fad1848_lib.c;h=ed7cdb028819d407b3a5aa895a75242f8c7e9d78;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=e0f8baa843b9c02cc31314f2cb149d98e41d8043;hpb=f7ed79d23a47594e7834d66a8f14449796d4f3e6;p=linux-2.6.git diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c index e0f8baa84..ed7cdb028 100644 --- a/sound/isa/ad1848/ad1848_lib.c +++ b/sound/isa/ad1848/ad1848_lib.c @@ -387,9 +387,9 @@ static int snd_ad1848_open(struct snd_ad1848 *chip, unsigned int mode) { unsigned long flags; - mutex_lock(&chip->open_mutex); + down(&chip->open_mutex); if (chip->mode & AD1848_MODE_OPEN) { - mutex_unlock(&chip->open_mutex); + up(&chip->open_mutex); return -EAGAIN; } snd_ad1848_mce_down(chip); @@ -432,7 +432,7 @@ static int snd_ad1848_open(struct snd_ad1848 *chip, unsigned int mode) spin_unlock_irqrestore(&chip->reg_lock, flags); chip->mode = mode; - mutex_unlock(&chip->open_mutex); + up(&chip->open_mutex); return 0; } @@ -441,9 +441,9 @@ static void snd_ad1848_close(struct snd_ad1848 *chip) { unsigned long flags; - mutex_lock(&chip->open_mutex); + down(&chip->open_mutex); if (!chip->mode) { - mutex_unlock(&chip->open_mutex); + up(&chip->open_mutex); return; } /* disable IRQ */ @@ -471,7 +471,7 @@ static void snd_ad1848_close(struct snd_ad1848 *chip) spin_unlock_irqrestore(&chip->reg_lock, flags); chip->mode = 0; - mutex_unlock(&chip->open_mutex); + up(&chip->open_mutex); } /* @@ -889,7 +889,7 @@ int snd_ad1848_create(struct snd_card *card, if (chip == NULL) return -ENOMEM; spin_lock_init(&chip->reg_lock); - mutex_init(&chip->open_mutex); + init_MUTEX(&chip->open_mutex); chip->card = card; chip->port = port; chip->irq = -1;