aboutsummaryrefslogtreecommitdiff
path: root/drivers/mfd
diff options
context:
space:
mode:
authorLars Poeschel2012-11-26 11:24:53 +0100
committerSamuel Ortiz2012-11-26 11:48:56 +0100
commit302b95621dc96651187c21fd66e5a44860e4c3b1 (patch)
tree7aaba49841ce5522631a7e550beeaa302ede4ce6 /drivers/mfd
parent3c39c9c6e9bda4d234bd24aaf34606479f581f4a (diff)
mfd: viperboard: Do version query in dma memory
The query for the viperboard version was done with memory buffer on the stack but usb transfers need dma capable memory buffer. This is fixed now. Signed-off-by: Lars Poeschel <poeschel@lemonage.de> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/viperboard.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mfd/viperboard.c b/drivers/mfd/viperboard.c
index 276122b37199..af2a6703f34f 100644
--- a/drivers/mfd/viperboard.c
+++ b/drivers/mfd/viperboard.c
@@ -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);
@@ -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,