Commit 4d616b15 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA CVS update

D:2003/09/04 19:12:30
C:HWDEP Midlevel
A:Jaroslav Kysela <perex@suse.cz>
F:core/hwdep.c:1.18->1.19 
L:Karsten Wiese <annabellesgarden@yahoo.de>
L:Fixed hwdep hotplug problem
parent 14a090f0
...@@ -132,10 +132,13 @@ static int snd_hwdep_open(struct inode *inode, struct file * file) ...@@ -132,10 +132,13 @@ static int snd_hwdep_open(struct inode *inode, struct file * file)
} }
set_current_state(TASK_RUNNING); set_current_state(TASK_RUNNING);
remove_wait_queue(&hw->open_wait, &wait); remove_wait_queue(&hw->open_wait, &wait);
if (err >= 0) {
err = snd_card_file_add(hw->card, file);
if (err >= 0) { if (err >= 0) {
file->private_data = hw; file->private_data = hw;
hw->used++; hw->used++;
} }
}
up(&hw->open_mutex); up(&hw->open_mutex);
return err; return err;
} }
...@@ -151,6 +154,7 @@ static int snd_hwdep_release(struct inode *inode, struct file * file) ...@@ -151,6 +154,7 @@ static int snd_hwdep_release(struct inode *inode, struct file * file)
} }
if (hw->used > 0) if (hw->used > 0)
hw->used--; hw->used--;
snd_card_file_remove(hw->card, file);
up(&hw->open_mutex); up(&hw->open_mutex);
return -ENXIO; return -ENXIO;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment