[alsa-cvslog] CVS: alsa-kernel/core hwdep.c,1.18,1.19
Brought to you by:
perex
From: Jaroslav K. <pe...@us...> - 2003-09-04 18:12:48
|
Update of /cvsroot/alsa/alsa-kernel/core In directory sc8-pr-cvs1:/tmp/cvs-serv28490 Modified Files: hwdep.c Log Message: Karsten Wiese <ann...@ya...> Fixed hwdep hotplug problem Index: hwdep.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/core/hwdep.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- hwdep.c 30 May 2003 13:37:36 -0000 1.18 +++ hwdep.c 4 Sep 2003 18:12:30 -0000 1.19 @@ -133,8 +133,11 @@ set_current_state(TASK_RUNNING); remove_wait_queue(&hw->open_wait, &wait); if (err >= 0) { - file->private_data = hw; - hw->used++; + err = snd_card_file_add(hw->card, file); + if (err >= 0) { + file->private_data = hw; + hw->used++; + } } up(&hw->open_mutex); return err; @@ -151,6 +154,7 @@ } if (hw->used > 0) hw->used--; + snd_card_file_remove(hw->card, file); up(&hw->open_mutex); return -ENXIO; } |