Update of /cvsroot/alsa/alsa-kernel/pci/ice1712
In directory usw-pr-cvs1:/tmp/cvs-serv5076

Modified Files:
        ews.c 
Log Message:
- fixed deadlock of i2c on ews88mt.
- clean up using goto in cs8404_spdif_write().



Index: ews.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ews.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- ews.c       18 Oct 2002 12:58:50 -0000      1.3
+++ ews.c       22 Oct 2002 10:38:09 -0000      1.4
@@ -221,16 +221,17 @@
        snd_i2c_lock(ice->i2c);
        switch (ice->eeprom.subvendor) {
        case ICE1712_SUBDEVICE_EWS88MT:
-               snd_runtime_check(snd_i2c_sendbytes(ice->cs8404, &bits, 1) == 1, 
snd_i2c_unlock(ice->i2c); return);
+               snd_runtime_check(snd_i2c_sendbytes(ice->cs8404, &bits, 1) == 1, goto 
+_error);
                break;
        case ICE1712_SUBDEVICE_EWS88D:
-               snd_runtime_check(snd_i2c_readbytes(ice->i2cdevs[0], bytes, 2) == 2, 
snd_i2c_unlock(ice->i2c); return);
+               snd_runtime_check(snd_i2c_readbytes(ice->i2cdevs[0], bytes, 2) == 2, 
+goto _error);
                if (bits != bytes[1]) {
                        bytes[1] = bits;
-                       snd_runtime_check(snd_i2c_readbytes(ice->i2cdevs[0], bytes, 2) 
== 2, snd_i2c_unlock(ice->i2c); return);
+                       snd_runtime_check(snd_i2c_readbytes(ice->i2cdevs[0], bytes, 2) 
+== 2, goto _error);
                }
                break;
        }
+ _error:
        snd_i2c_unlock(ice->i2c);
 }
 
@@ -567,6 +568,7 @@
        }
        /* reversed; high = +4dBu, low = -10dBV */
        ucontrol->value.enumerated.item[0] = data & (1 << channel) ? 0 : 1;
+       snd_i2c_unlock(ice->i2c);
        return 0;
 }
 



-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future of 
Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) 
program now. http://ad.doubleclick.net/clk;4699841;7576301;v?
http://www.sun.com/javavote
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to