Update of /cvsroot/alsa/alsa-kernel In directory usw-pr-cvs1:/tmp/cvs-serv27460
Modified Files: sound_core.c Log Message: Call devfs_unregister() outside spinlock Index: sound_core.c =================================================================== RCS file: /cvsroot/alsa/alsa-kernel/sound_core.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- sound_core.c 13 Aug 2002 16:13:33 -0000 1.8 +++ sound_core.c 13 Oct 2002 13:14:36 -0000 1.9 @@ -122,7 +122,7 @@ * Remove a node from the chain. Called with the lock asserted */ -static void __sound_remove_unit(struct sound_unit **list, int unit) +static struct sound_unit *__sound_remove_unit(struct sound_unit **list, int unit) { while(*list) { @@ -130,13 +130,12 @@ if(p->unit_minor==unit) { *list=p->next; - devfs_unregister (p->de); - kfree(p); - return; + return p; } list=&(p->next); } printk(KERN_ERR "Sound device %d went missing!\n", unit); + return NULL; } /* @@ -189,9 +188,15 @@ static void sound_remove_unit(struct sound_unit **list, int unit) { + struct sound_unit *p; + spin_lock(&sound_loader_lock); - __sound_remove_unit(list, unit); + p = __sound_remove_unit(list, unit); spin_unlock(&sound_loader_lock); + if (p) { + devfs_unregister (p->de); + kfree(p); + } } /* ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog