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

Modified Files:
        control.c 
Log Message:
[PATCH: power-lock-fix.dif]

removed snd_power_lock/unlock from suspend/resume callbacks since
this will invoke sleep eventually.
snd_power_lock/unlock are called inside the control pm ioctl
globally, instead.



Index: control.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/core/control.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- control.c   19 Dec 2002 15:59:17 -0000      1.24
+++ control.c   7 Jan 2003 10:25:26 -0000       1.25
@@ -628,13 +628,15 @@
                        return -EFAULT;
                if (!capable(CAP_SYS_ADMIN))
                        return -EPERM;
+               err = -ENOPROTOOPT;
 #ifdef CONFIG_PM
-               if (card->set_power_state == NULL)
-                       return -ENOPROTOOPT;
-               return card->set_power_state(card, err);
-#else
-               return -ENOPROTOOPT;
+               if (card->set_power_state) {
+                   snd_power_lock(card);
+                   err = card->set_power_state(card, err);
+                   snd_power_unlock(card);
+               }
 #endif
+               return err;
        case SNDRV_CTL_IOCTL_POWER_STATE:
 #ifdef CONFIG_PM
                return put_user(card->power_state, (int *)arg) ? -EFAULT : 0;



-------------------------------------------------------
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