aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/ymfpci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/ymfpci.c')
-rw-r--r--sound/oss/ymfpci.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/oss/ymfpci.c b/sound/oss/ymfpci.c
index f8bd72e46f57..bf90c124a7e6 100644
--- a/sound/oss/ymfpci.c
+++ b/sound/oss/ymfpci.c
@@ -1918,10 +1918,10 @@ static int ymf_open(struct inode *inode, struct file *file)
1918 if (unit == NULL) 1918 if (unit == NULL)
1919 return -ENODEV; 1919 return -ENODEV;
1920 1920
1921 down(&unit->open_sem); 1921 mutex_lock(&unit->open_mutex);
1922 1922
1923 if ((state = ymf_state_alloc(unit)) == NULL) { 1923 if ((state = ymf_state_alloc(unit)) == NULL) {
1924 up(&unit->open_sem); 1924 mutex_unlock(&unit->open_mutex);
1925 return -ENOMEM; 1925 return -ENOMEM;
1926 } 1926 }
1927 list_add_tail(&state->chain, &unit->states); 1927 list_add_tail(&state->chain, &unit->states);
@@ -1956,7 +1956,7 @@ static int ymf_open(struct inode *inode, struct file *file)
1956 ymfpci_writeb(unit, YDSXGR_TIMERCTRL, 1956 ymfpci_writeb(unit, YDSXGR_TIMERCTRL,
1957 (YDSXGR_TIMERCTRL_TEN|YDSXGR_TIMERCTRL_TIEN)); 1957 (YDSXGR_TIMERCTRL_TEN|YDSXGR_TIMERCTRL_TIEN));
1958#endif 1958#endif
1959 up(&unit->open_sem); 1959 mutex_unlock(&unit->open_mutex);
1960 1960
1961 return nonseekable_open(inode, file); 1961 return nonseekable_open(inode, file);
1962 1962
@@ -1974,7 +1974,7 @@ out_nodma:
1974 list_del(&state->chain); 1974 list_del(&state->chain);
1975 kfree(state); 1975 kfree(state);
1976 1976
1977 up(&unit->open_sem); 1977 mutex_unlock(&unit->open_mutex);
1978 return err; 1978 return err;
1979} 1979}
1980 1980
@@ -1987,7 +1987,7 @@ static int ymf_release(struct inode *inode, struct file *file)
1987 ymfpci_writeb(unit, YDSXGR_TIMERCTRL, 0); 1987 ymfpci_writeb(unit, YDSXGR_TIMERCTRL, 0);
1988#endif 1988#endif
1989 1989
1990 down(&unit->open_sem); 1990 mutex_lock(&unit->open_mutex);
1991 1991
1992 /* 1992 /*
1993 * XXX Solve the case of O_NONBLOCK close - don't deallocate here. 1993 * XXX Solve the case of O_NONBLOCK close - don't deallocate here.
@@ -2004,7 +2004,7 @@ static int ymf_release(struct inode *inode, struct file *file)
2004 file->private_data = NULL; /* Can you tell I programmed Solaris */ 2004 file->private_data = NULL; /* Can you tell I programmed Solaris */
2005 kfree(state); 2005 kfree(state);
2006 2006
2007 up(&unit->open_sem); 2007 mutex_unlock(&unit->open_mutex);
2008 2008
2009 return 0; 2009 return 0;
2010} 2010}
@@ -2532,7 +2532,7 @@ static int __devinit ymf_probe_one(struct pci_dev *pcidev, const struct pci_devi
2532 spin_lock_init(&codec->reg_lock); 2532 spin_lock_init(&codec->reg_lock);
2533 spin_lock_init(&codec->voice_lock); 2533 spin_lock_init(&codec->voice_lock);
2534 spin_lock_init(&codec->ac97_lock); 2534 spin_lock_init(&codec->ac97_lock);
2535 init_MUTEX(&codec->open_sem); 2535 mutex_init(&codec->open_mutex);
2536 INIT_LIST_HEAD(&codec->states); 2536 INIT_LIST_HEAD(&codec->states);
2537 codec->pci = pcidev; 2537 codec->pci = pcidev;
2538 2538