Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1:/tmp/cvs-serv15155/pci
Modified Files:
cs4281.c ens1370.c fm801.c
Log Message:
fixed timeout check; using standard time_xxx macros.
Index: cs4281.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/cs4281.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -r1.37 -r1.38
--- cs4281.c 25 Feb 2003 13:35:41 -0000 1.37
+++ cs4281.c 24 Mar 2003 16:32:35 -0000 1.38
@@ -534,7 +534,7 @@
{
if (delay > 999) {
if (can_schedule) {
- signed long end_time;
+ unsigned long end_time;
delay = (delay * HZ) / 1000000;
if (delay < 1)
delay = 1;
@@ -542,7 +542,7 @@
do {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
- } while (end_time - (signed long)jiffies >= 0);
+ } while (time_after_eq(end_time, jiffies));
} else {
delay += 999;
delay /= 1000;
Index: ens1370.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/ens1370.c,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -r1.38 -r1.39
--- ens1370.c 25 Feb 2003 12:35:44 -0000 1.38
+++ ens1370.c 24 Mar 2003 16:32:35 -0000 1.39
@@ -551,7 +551,7 @@
{
ensoniq_t *ensoniq = snd_magic_cast(ensoniq_t, ak4531->private_data, return);
unsigned long flags;
- signed long end_time = jiffies + HZ / 10;
+ unsigned long end_time = jiffies + HZ / 10;
#if 0
printk("CODEC WRITE: reg = 0x%x, val = 0x%x (0x%x), creg = 0x%x\n", reg, val,
ES_1370_CODEC_WRITE(reg, val), ES_REG(ensoniq, 1370_CODEC));
@@ -568,7 +568,7 @@
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
#endif
- } while ((signed long)(end_time - jiffies) > 0);
+ } while (time_after(end_time, jiffies));
snd_printk("codec write timeout, status = 0x%x\n", inl(ES_REG(ensoniq,
STATUS)));
}
Index: fm801.c
===================================================================
RCS file: /cvsroot/alsa/alsa-kernel/pci/fm801.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- fm801.c 7 Feb 2003 08:34:16 -0000 1.30
+++ fm801.c 24 Mar 2003 16:32:35 -0000 1.31
@@ -921,7 +921,7 @@
fm801_t *chip;
unsigned char rev, id;
unsigned short cmdw;
- signed long timeout;
+ unsigned long timeout;
int err;
static snd_device_ops_t ops = {
.dev_free = snd_fm801_dev_free,
@@ -969,7 +969,7 @@
goto __ac97_secondary;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
- } while ((timeout - (signed long)jiffies) > 0);
+ } while (time_after(timeout, jiffies));
snd_printk("Primary AC'97 codec not found\n");
snd_fm801_free(chip);
return -EIO;
@@ -980,8 +980,7 @@
for (id = 3; id > 0; id--) { /* my card has the secondary codec */
/* at address #3, so the loop is inverted */
- if ((timeout - (signed long)jiffies) < HZ / 20)
- timeout = jiffies + HZ / 20;
+ timeout = jiffies + HZ / 20;
outw((1<<7) | (id << FM801_AC97_ADDR_SHIFT) | AC97_VENDOR_ID1,
FM801_REG(chip, AC97_CMD));
udelay(5);
@@ -996,7 +995,7 @@
}
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
- } while ((timeout - (signed long)jiffies) > 0);
+ } while (time_after(timeout, jiffies));
}
/* the recovery phase, it seems that probing for non-existing codec might */
@@ -1010,7 +1009,7 @@
goto __ac97_ok;
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
- } while ((timeout - (signed long)jiffies) > 0);
+ } while (time_after(timeout, jiffies));
snd_printk("Primary AC'97 codec not responding\n");
snd_fm801_free(chip);
return -EIO;
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog