Subversion Repositories shark

Compare Revisions

Ignore whitespace Rev 463 → Rev 464

/shark/trunk/drivers/bttv/bttv-cards.c
3032,6 → 3032,8
#define TEA_STATUS_TUNED 0
#define TEA_STATUS_SEARCHING 1
 
extern unsigned long read_time(void);
 
/* Low-level stuff */
static int tea5757_read(struct bttv *btv)
{
3056,11 → 3058,10
bus_low(btv,btv->mbox_clk);
udelay(10);
timeout= jiffies + HZ;
timeout= read_time() + 1000000;
 
// wait for DATA line to go low; error if it doesn't
while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
schedule();
while (bus_in(btv,btv->mbox_data) && timeout > read_time());
if (bus_in(btv,btv->mbox_data)) {
printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->nr);
return -1;