Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv7367/core

Modified Files:
        init.c 
Log Message:
[PATCH: card-free-cleanup.dif]

- clean up snd_card_free() and snd_card_free_in_thread().



Index: init.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v
retrieving revision 1.28
retrieving revision 1.29
diff -u -r1.28 -r1.29
--- init.c      19 Dec 2002 15:59:17 -0000      1.28
+++ init.c      7 Jan 2003 10:37:47 -0000       1.29
@@ -231,7 +231,6 @@
  */
 int snd_card_free(snd_card_t * card)
 {
-       wait_queue_t wait;
        struct snd_shutdown_f_ops *s_f_ops;
 
        if (card == NULL)
@@ -242,13 +241,7 @@
        write_unlock(&snd_card_rwlock);
 
        /* wait, until all devices are ready for the free operation */
-       init_waitqueue_entry(&wait, current);
-       add_wait_queue(&card->shutdown_sleep, &wait);
-       while (card->files) {
-               set_current_state(TASK_UNINTERRUPTIBLE);
-               schedule_timeout(30 * HZ);
-       }
-       remove_wait_queue(&card->shutdown_sleep, &wait);
+       wait_event(card->shutdown_sleep, card->files == NULL);
 
 #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
        if (snd_mixer_oss_notify_callback)
@@ -298,8 +291,6 @@
                snd_printk(KERN_ERR "unable to lock toplevel module for card %i in 
free thread\n", card->number);
                module = NULL;
        }
-
-       wait_event(card->shutdown_sleep, card->files == NULL);
 
        snd_card_free(card);
 



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to