Update of /cvsroot/alsa/alsa-kernel/core
In directory sc8-pr-cvs1:/tmp/cvs-serv13419/core
Modified Files:
init.c
Log Message:
- fixed oops at resume.
- block also the non-blocking devices until the resume is finished.
Index: init.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- init.c 23 Oct 2003 14:34:52 -0000 1.40
+++ init.c 24 Oct 2003 13:43:59 -0000 1.41
@@ -679,6 +679,7 @@
int snd_power_wait(snd_card_t *card, unsigned int power_state, struct file *file)
{
wait_queue_t wait;
+ int result = 0;
/* fastpath */
if (snd_power_get_state(card) == power_state)
@@ -686,18 +687,24 @@
init_waitqueue_entry(&wait, current);
add_wait_queue(&card->power_sleep, &wait);
while (1) {
- if (card->shutdown)
- return -ENODEV;
- if (snd_power_get_state(card) == power_state) {
- remove_wait_queue(&card->power_sleep, &wait);
- return 0;
+ if (card->shutdown) {
+ result = -ENODEV;
+ break;
}
- if (file && (file->f_flags & O_NONBLOCK))
- return -EAGAIN;
+ if (snd_power_get_state(card) == power_state)
+ break;
+#if 0 /* block all devices */
+ if (file && (file->f_flags & O_NONBLOCK)) {
+ result = -EAGAIN;
+ break;
+ }
+#endif
set_current_state(TASK_UNINTERRUPTIBLE);
snd_power_unlock(card);
schedule_timeout(30 * HZ);
snd_power_lock(card);
}
+ remove_wait_queue(&card->power_sleep, &wait);
+ return result;
}
#endif /* CONFIG_PM */
-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community? Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog