static inline int apollo_wait_for_ack_ value struct apollofb_par par u

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
static inline int apollo_wait_for_ack_value(struct apollofb_par *par,
unsigned int value)
{
unsigned long timeout = jiffies + 2 * HZ;
while (par->ops->get_ctl_pin(H_ACK) != value)
{
if(time_before(jiffies, timeout))
schedule();
else
{
printk(KERN_ERR "%s: Wait for H_ACK == %u, timeout\n",
__func__, value);
return 1;
}
}
return 0;
}