xpad: common changes
Subsystems (2)
PATCH 1/3 xpad: common changes
This patch enables the output URB for XBox360 Wireless controllers, as required by either of the other patches which follow.
Signed-off-by Chris Moeller <[email protected]>
drivers/input/joystick/xpad.c renamed from drivers/input/joystick/xpad.c.orig +3 -3
@@ -545,7 +542,7 @@ static int xpad_init_output(struct usb_istruct usb_endpoint_descriptor *ep_irq_out;int error; -if (xpad->xtype !=XTYPE_XBOX360 && xpad->xtype !=XTYPE_XBOX ) +if (xpad->xtype ==XTYPE_UNKNOWN )return 0 ; xpad->odata = usb_alloc_coherent(xpad->udev, XPAD_PKT_LEN,
@@ -579,13 +576,13 @@ static int xpad_init_output(struct usb_istatic void xpad_stop_output (struct usb_xpad *xpad) { -if (xpad->xtype ==XTYPE_XBOX360 || xpad->xtype ==XTYPE_XBOX ) +if (xpad->xtype !=XTYPE_UNKNOWN )usb_kill_urb (xpad->irq_out); }static void xpad_deinit_output (struct usb_xpad *xpad) { -if (xpad->xtype ==XTYPE_XBOX360 || xpad->xtype ==XTYPE_XBOX ) { +if (xpad->xtype !=XTYPE_UNKNOWN ) {usb_free_urb (xpad->irq_out);usb_free_coherent (xpad->udev,XPAD_PKT_LEN , xpad->odata, xpad->odata_dma);