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
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;
}
if (hw->used > 0)
hw->used--;
+ snd_card_file_remove(hw->card, file);
up(&hw->open_mutex);
return -ENXIO;
}