Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 345033
b: refs/heads/master
c: 302b956
h: refs/heads/master
i:
  345031: 9b4666a
v: v3
  • Loading branch information
Lars Poeschel authored and Samuel Ortiz committed Nov 26, 2012
1 parent 4735034 commit 8b2172b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: 3c39c9c6e9bda4d234bd24aaf34606479f581f4a
refs/heads/master: 302b95621dc96651187c21fd66e5a44860e4c3b1
9 changes: 4 additions & 5 deletions trunk/drivers/mfd/viperboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ static int vprbrd_probe(struct usb_interface *interface,

u16 version = 0;
int pipe, ret;
unsigned char buf[1];

/* allocate memory for our device state and initialize it */
vb = kzalloc(sizeof(*vb), GFP_KERNEL);
Expand All @@ -76,17 +75,17 @@ static int vprbrd_probe(struct usb_interface *interface,
/* get version information, major first, minor then */
pipe = usb_rcvctrlpipe(vb->usb_dev, 0);
ret = usb_control_msg(vb->usb_dev, pipe, VPRBRD_USB_REQUEST_MAJOR,
VPRBRD_USB_TYPE_IN, 0x0000, 0x0000, buf, 1,
VPRBRD_USB_TYPE_IN, 0x0000, 0x0000, vb->buf, 1,
VPRBRD_USB_TIMEOUT_MS);
if (ret == 1)
version = buf[0];
version = vb->buf[0];

ret = usb_control_msg(vb->usb_dev, pipe, VPRBRD_USB_REQUEST_MINOR,
VPRBRD_USB_TYPE_IN, 0x0000, 0x0000, buf, 1,
VPRBRD_USB_TYPE_IN, 0x0000, 0x0000, vb->buf, 1,
VPRBRD_USB_TIMEOUT_MS);
if (ret == 1) {
version <<= 8;
version = version | buf[0];
version = version | vb->buf[0];
}

dev_info(&interface->dev,
Expand Down

0 comments on commit 8b2172b

Please sign in to comment.