Commit 8f372a59 authored by Dave Jones's avatar Dave Jones Committed by Linus Torvalds

[PATCH] jiffy wrap fixes

parent a23a3454
......@@ -72,12 +72,12 @@ inline void lmc_trace(struct net_device *dev, char *msg){
if(in_interrupt()){
printk("%s: * %s\n", dev->name, msg);
// while(jiffies < j+10)
// while(time_before(jiffies, j+10))
// ;
}
else {
printk("%s: %s\n", dev->name, msg);
while(jiffies < j)
while(time_before(jiffies, j))
schedule();
}
#endif
......
......@@ -535,7 +535,7 @@ static int li_ad1843_wait(lithium_t *lith)
{
unsigned long later = jiffies + 2;
while (li_readl(lith, LI_CODEC_COMMAND) & LI_CC_BUSY)
if (jiffies >= later)
if (time_after_eq(jiffies, later))
return -EBUSY;
return 0;
}
......@@ -1358,7 +1358,7 @@ static int __init ad1843_init(lithium_t *lith)
later = jiffies + HZ / 2; /* roughly half a second */
DBGDO(shut_up++);
while (ad1843_read_bits(lith, &ad1843_PDNO)) {
if (jiffies > later) {
if (time_after(jiffies, later)) {
printk(KERN_ERR
"vwsnd audio: AD1843 won't power up\n");
return -EIO;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment