Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 1021
b: refs/heads/master
c: fc9d53a
h: refs/heads/master
i:
  1019: ca1e99a
v: v3
  • Loading branch information
Manu Abraham authored and Linus Torvalds committed May 5, 2005
1 parent 7d67e17 commit a3e077c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 2ef41634def0fcb0def3e3c90220c651ca478cb3
refs/heads/master: fc9d53af37deeb830252f03c62724078d943686c
14 changes: 6 additions & 8 deletions trunk/drivers/media/video/bttv-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/jiffies.h>
#include <asm/io.h>

#include "bttvp.h"
Expand Down Expand Up @@ -130,17 +131,14 @@ static u32 functionality(struct i2c_adapter *adap)
static int
bttv_i2c_wait_done(struct bttv *btv)
{
DECLARE_WAITQUEUE(wait, current);
int rc = 0;

add_wait_queue(&btv->i2c_queue, &wait);
if (0 == btv->i2c_done)
msleep_interruptible(20);
remove_wait_queue(&btv->i2c_queue, &wait);
/* timeout */
if (wait_event_interruptible_timeout(btv->i2c_queue,
btv->i2c_done, msecs_to_jiffies(85)) == -ERESTARTSYS)

rc = -EIO;

if (0 == btv->i2c_done)
/* timeout */
rc = -EIO;
if (btv->i2c_done & BT848_INT_RACK)
rc = 1;
btv->i2c_done = 0;
Expand Down

0 comments on commit a3e077c

Please sign in to comment.