diff options
Diffstat (limited to 'sound/isa/ad1848/ad1848_lib.c')
-rw-r--r-- | sound/isa/ad1848/ad1848_lib.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c index b78530d7ea90..d4b0e580557e 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) | |||
387 | { | 387 | { |
388 | unsigned long flags; | 388 | unsigned long flags; |
389 | 389 | ||
390 | down(&chip->open_mutex); | 390 | mutex_lock(&chip->open_mutex); |
391 | if (chip->mode & AD1848_MODE_OPEN) { | 391 | if (chip->mode & AD1848_MODE_OPEN) { |
392 | up(&chip->open_mutex); | 392 | mutex_unlock(&chip->open_mutex); |
393 | return -EAGAIN; | 393 | return -EAGAIN; |
394 | } | 394 | } |
395 | snd_ad1848_mce_down(chip); | 395 | snd_ad1848_mce_down(chip); |
@@ -432,7 +432,7 @@ static int snd_ad1848_open(struct snd_ad1848 *chip, unsigned int mode) | |||
432 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 432 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
433 | 433 | ||
434 | chip->mode = mode; | 434 | chip->mode = mode; |
435 | up(&chip->open_mutex); | 435 | mutex_unlock(&chip->open_mutex); |
436 | 436 | ||
437 | return 0; | 437 | return 0; |
438 | } | 438 | } |
@@ -441,9 +441,9 @@ static void snd_ad1848_close(struct snd_ad1848 *chip) | |||
441 | { | 441 | { |
442 | unsigned long flags; | 442 | unsigned long flags; |
443 | 443 | ||
444 | down(&chip->open_mutex); | 444 | mutex_lock(&chip->open_mutex); |
445 | if (!chip->mode) { | 445 | if (!chip->mode) { |
446 | up(&chip->open_mutex); | 446 | mutex_unlock(&chip->open_mutex); |
447 | return; | 447 | return; |
448 | } | 448 | } |
449 | /* disable IRQ */ | 449 | /* disable IRQ */ |
@@ -471,7 +471,7 @@ static void snd_ad1848_close(struct snd_ad1848 *chip) | |||
471 | spin_unlock_irqrestore(&chip->reg_lock, flags); | 471 | spin_unlock_irqrestore(&chip->reg_lock, flags); |
472 | 472 | ||
473 | chip->mode = 0; | 473 | chip->mode = 0; |
474 | up(&chip->open_mutex); | 474 | mutex_unlock(&chip->open_mutex); |
475 | } | 475 | } |
476 | 476 | ||
477 | /* | 477 | /* |
@@ -889,7 +889,7 @@ int snd_ad1848_create(struct snd_card *card, | |||
889 | if (chip == NULL) | 889 | if (chip == NULL) |
890 | return -ENOMEM; | 890 | return -ENOMEM; |
891 | spin_lock_init(&chip->reg_lock); | 891 | spin_lock_init(&chip->reg_lock); |
892 | init_MUTEX(&chip->open_mutex); | 892 | mutex_init(&chip->open_mutex); |
893 | chip->card = card; | 893 | chip->card = card; |
894 | chip->port = port; | 894 | chip->port = port; |
895 | chip->irq = -1; | 895 | chip->irq = -1; |