diff options
author | Lars Poeschel <poeschel@lemonage.de> | 2012-11-26 05:24:53 -0500 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2012-11-26 05:48:56 -0500 |
commit | 302b95621dc96651187c21fd66e5a44860e4c3b1 (patch) | |
tree | 7aaba49841ce5522631a7e550beeaa302ede4ce6 /drivers/mfd/viperboard.c | |
parent | 3c39c9c6e9bda4d234bd24aaf34606479f581f4a (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/viperboard.c')
-rw-r--r-- | drivers/mfd/viperboard.c | 9 |
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, | |||
56 | 56 | ||
57 | u16 version = 0; | 57 | u16 version = 0; |
58 | int pipe, ret; | 58 | int pipe, ret; |
59 | unsigned char buf[1]; | ||
60 | 59 | ||
61 | /* allocate memory for our device state and initialize it */ | 60 | /* allocate memory for our device state and initialize it */ |
62 | vb = kzalloc(sizeof(*vb), GFP_KERNEL); | 61 | vb = kzalloc(sizeof(*vb), GFP_KERNEL); |
@@ -76,17 +75,17 @@ static int vprbrd_probe(struct usb_interface *interface, | |||
76 | /* get version information, major first, minor then */ | 75 | /* get version information, major first, minor then */ |
77 | pipe = usb_rcvctrlpipe(vb->usb_dev, 0); | 76 | pipe = usb_rcvctrlpipe(vb->usb_dev, 0); |
78 | ret = usb_control_msg(vb->usb_dev, pipe, VPRBRD_USB_REQUEST_MAJOR, | 77 | ret = usb_control_msg(vb->usb_dev, pipe, VPRBRD_USB_REQUEST_MAJOR, |
79 | VPRBRD_USB_TYPE_IN, 0x0000, 0x0000, buf, 1, | 78 | VPRBRD_USB_TYPE_IN, 0x0000, 0x0000, vb->buf, 1, |
80 | VPRBRD_USB_TIMEOUT_MS); | 79 | VPRBRD_USB_TIMEOUT_MS); |
81 | if (ret == 1) | 80 | if (ret == 1) |
82 | version = buf[0]; | 81 | version = vb->buf[0]; |
83 | 82 | ||
84 | ret = usb_control_msg(vb->usb_dev, pipe, VPRBRD_USB_REQUEST_MINOR, | 83 | ret = usb_control_msg(vb->usb_dev, pipe, VPRBRD_USB_REQUEST_MINOR, |
85 | VPRBRD_USB_TYPE_IN, 0x0000, 0x0000, buf, 1, | 84 | VPRBRD_USB_TYPE_IN, 0x0000, 0x0000, vb->buf, 1, |
86 | VPRBRD_USB_TIMEOUT_MS); | 85 | VPRBRD_USB_TIMEOUT_MS); |
87 | if (ret == 1) { | 86 | if (ret == 1) { |
88 | version <<= 8; | 87 | version <<= 8; |
89 | version = version | buf[0]; | 88 | version = version | vb->buf[0]; |
90 | } | 89 | } |
91 | 90 | ||
92 | dev_info(&interface->dev, | 91 | dev_info(&interface->dev, |