Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv29864/core
Modified Files:
init.c
Log Message:
- fixed snd_card_free_in_thread().
workqueue must be allocated statically. now it's in the card struct.
Index: init.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- init.c 30 May 2003 13:37:36 -0000 1.36
+++ init.c 4 Jun 2003 17:25:05 -0000 1.37
@@ -26,7 +26,6 @@
#include <linux/slab.h>
#include <linux/time.h>
#include <linux/ctype.h>
-#include <linux/workqueue.h>
#include <sound/core.h>
#include <sound/control.h>
#include <sound/info.h>
@@ -50,6 +49,8 @@
snd_iprintf(buffer, "%s\n", entry->card->id);
}
+static void snd_card_free_thread(void * __card);
+
/**
* snd_card_new - create and initialize a soundcard structure
* @idx: card index (address) [0 ... (SNDRV_CARDS-1)]
@@ -115,6 +116,7 @@
INIT_LIST_HEAD(&card->ctl_files);
spin_lock_init(&card->files_lock);
init_waitqueue_head(&card->shutdown_sleep);
+ INIT_WORK(&card->free_workq, snd_card_free_thread, card);
#ifdef CONFIG_PM
init_MUTEX(&card->power_lock);
init_waitqueue_head(&card->power_sleep);
@@ -327,16 +329,15 @@
*/
int snd_card_free_in_thread(snd_card_t * card)
{
- DECLARE_WORK(works, snd_card_free_thread, card);
-
if (card->files == NULL) {
snd_card_free(card);
return 0;
}
- if (schedule_work(&works))
+
+ if (schedule_work(&card->free_workq))
return 0;
- snd_printk(KERN_ERR "kernel_thread failed in snd_card_free_in_thread for card
%i\n", card->number);
+ snd_printk(KERN_ERR "schedule_work() failed in snd_card_free_in_thread for
card %i\n", card->number);
/* try to free the structure immediately */
snd_card_free(card);
return -EFAULT;
-------------------------------------------------------
This SF.net email is sponsored by: Etnus, makers of TotalView, The best
thread debugger on the planet. Designed with thread debugging features
you've never dreamed of, try TotalView 6 free at www.etnus.com.
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog