Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236305
b: refs/heads/master
c: fd49b78
h: refs/heads/master
i:
  236303: 008f010
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Mar 7, 2011
1 parent 999c8db commit 2fbd499
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 33 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: 4495c15f29a11c41d0a69a6e848307b0db7cc196
refs/heads/master: fd49b7879890d0f17c1cb86eb07e449d9c9f0699
1 change: 0 additions & 1 deletion trunk/drivers/staging/easycap/easycap.h
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,6 @@ int set_resolution(struct usb_device *,
int read_saa(struct usb_device *, u16);
int read_stk(struct usb_device *, u32);
int write_saa(struct usb_device *, u16, u16);
int wait_i2c(struct usb_device *);
int write_000(struct usb_device *, u16, u16);
int start_100(struct usb_device *);
int stop_100(struct usb_device *);
Expand Down
61 changes: 30 additions & 31 deletions trunk/drivers/staging/easycap/easycap_low.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,36 @@ static int regset(struct usb_device *pusb_device, u16 index, u16 value)

return rc;
}
/*****************************************************************************/
/*--------------------------------------------------------------------------*/
/*
* FUNCTION wait_i2c() RETURNS 0 ON SUCCESS
*/
/*--------------------------------------------------------------------------*/
static int wait_i2c(struct usb_device *p)
{
u16 get0;
u8 igot;
const int max = 2;
int k;

if (!p)
return -ENODEV;

for (k = 0; k < max; k++) {
GET(p, 0x0201, &igot); get0 = igot;
switch (get0) {
case 0x04:
case 0x01:
return 0;
case 0x00:
msleep(20);
continue;
default:
return get0 - 1;
}
}
return -1;
}

/****************************************************************************/
int confirm_resolution(struct usb_device *p)
Expand Down Expand Up @@ -935,36 +964,6 @@ int stop_100(struct usb_device *p)
return 0;
}
/****************************************************************************/
/*--------------------------------------------------------------------------*/
/*
* FUNCTION wait_i2c() RETURNS 0 ON SUCCESS
*/
/*--------------------------------------------------------------------------*/
int wait_i2c(struct usb_device *p)
{
u16 get0;
u8 igot;
const int max = 2;
int k;

if (!p)
return -ENODEV;

for (k = 0; k < max; k++) {
GET(p, 0x0201, &igot); get0 = igot;
switch (get0) {
case 0x04:
case 0x01:
return 0;
case 0x00:
msleep(20);
continue;
default:
return get0 - 1;
}
}
return -1;
}
/****************************************************************************/
/*****************************************************************************/
int wakeup_device(struct usb_device *pusb_device)
Expand Down

0 comments on commit 2fbd499

Please sign in to comment.