diff options
author | Michael Gruber <lists.mg@googlemail.com> | 2008-04-15 01:31:47 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-04-15 01:31:47 -0400 |
commit | 04021e4e401d7ac2051839dd5b00a701c9119dd9 (patch) | |
tree | 730ddade85c0b42ef2b9ea1ad0ca2b8459e13d99 /drivers/input | |
parent | da3e4c885e5ebbccc8181f53d8ae74c4c22d506f (diff) |
Input: xpad - set proper buffer length for outgoing requests
The messages for led/rumble are exactly 3 and 8 bytes respectively.
Hence set up the transfer_buffer_length accordingly.
Signed-off-by: Michael Gruber <lists.mg@googlemail.com>
Acked-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/joystick/xpad.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index d4d289e75dc2..52ddb04644ab 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c | |||
@@ -558,6 +558,7 @@ static int xpad_play_effect(struct input_dev *dev, void *data, | |||
558 | xpad->odata[5] = 0x00; | 558 | xpad->odata[5] = 0x00; |
559 | xpad->odata[6] = 0x00; | 559 | xpad->odata[6] = 0x00; |
560 | xpad->odata[7] = 0x00; | 560 | xpad->odata[7] = 0x00; |
561 | xpad->irq_out->transfer_buffer_length = 8; | ||
561 | usb_submit_urb(xpad->irq_out, GFP_KERNEL); | 562 | usb_submit_urb(xpad->irq_out, GFP_KERNEL); |
562 | } | 563 | } |
563 | 564 | ||
@@ -594,6 +595,7 @@ static void xpad_send_led_command(struct usb_xpad *xpad, int command) | |||
594 | xpad->odata[0] = 0x01; | 595 | xpad->odata[0] = 0x01; |
595 | xpad->odata[1] = 0x03; | 596 | xpad->odata[1] = 0x03; |
596 | xpad->odata[2] = command; | 597 | xpad->odata[2] = command; |
598 | xpad->irq_out->transfer_buffer_length = 3; | ||
597 | usb_submit_urb(xpad->irq_out, GFP_KERNEL); | 599 | usb_submit_urb(xpad->irq_out, GFP_KERNEL); |
598 | mutex_unlock(&xpad->odata_mutex); | 600 | mutex_unlock(&xpad->odata_mutex); |
599 | } | 601 | } |