Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235883
b: refs/heads/master
c: 32851b3
h: refs/heads/master
i:
  235881: bbeae2c
  235879: 98da340
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Feb 9, 2011
1 parent b5dd928 commit 6237969
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 26 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: 73132ce45a011ef76340e3d6393e79d8377e4312
refs/heads/master: 32851b325e32bf9de72500d77488ffd9f7120395
37 changes: 12 additions & 25 deletions trunk/drivers/staging/easycap/easycap_low.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#define GET(X, Y, Z) do { \
int __rc; \
*(Z) = (u16)0; \
__rc = regget(X, Y, Z); \
__rc = regget(X, Y, Z, sizeof(u8)); \
if (0 > __rc) { \
JOT(8, ":-(%i\n", __LINE__); return __rc; \
} \
Expand Down Expand Up @@ -256,54 +256,41 @@ static const struct saa7113config saa7113configNTSC[256] = {
{0xFF, 0xFF}
};

static int regget(struct usb_device *pusb_device, u16 index, void *pvoid)
static int regget(struct usb_device *pusb_device,
u16 index, void *reg, int reg_size)
{
int rc;

if (!pusb_device)
return -ENODEV;

rc = usb_control_msg(pusb_device, usb_rcvctrlpipe(pusb_device, 0),
(u8)0x00,
(u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
(u16)0x00,
(u16)index,
(void *)pvoid,
sizeof(u8),
(int)50000);
0x00,
(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
0x00,
index, reg, reg_size, 50000);

return 0xFF & rc;
}

static int regset(struct usb_device *pusb_device, u16 index, u16 value)
{
u16 igot;
int rc0, rc1;
u16 igot;

if (!pusb_device)
return -ENODEV;

rc1 = 0; igot = 0;
rc0 = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0),
(u8)0x01,
(u8)(USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
(u16)value,
(u16)index,
NULL,
(u16)0,
(int)500);
0x01,
(USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
value, index, NULL, 0, 500);

#ifdef NOREADBACK
#
#else
rc1 = usb_control_msg(pusb_device, usb_rcvctrlpipe(pusb_device, 0),
(u8)0x00,
(u8)(USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE),
(u16)0x00,
(u16)index,
(void *)&igot,
(u16)sizeof(u16),
(int)50000);
rc1 = regget(pusb_device, index, &igot, sizeof(igot));
igot = 0xFF & igot;
switch (index) {
case 0x000:
Expand Down

0 comments on commit 6237969

Please sign in to comment.