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