From patchwork Mon Jun 13 00:17:34 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Moeller X-Patchwork-Id: 873612 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p5D0Hcrj023869 for ; Mon, 13 Jun 2011 00:17:38 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754543Ab1FMARg (ORCPT ); Sun, 12 Jun 2011 20:17:36 -0400 Received: from mail-pw0-f46.google.com ([209.85.160.46]:33609 "EHLO mail-pw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754253Ab1FMARg (ORCPT ); Sun, 12 Jun 2011 20:17:36 -0400 Received: by pwi15 with SMTP id 15so1891161pwi.19 for ; Sun, 12 Jun 2011 17:17:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:cc:date:content-type:x-mailer :content-transfer-encoding:message-id:mime-version; bh=Zyevg+sSYHKloLxi+v2HJD2tMEG3ydEVA0scPJxg3dU=; b=a/k4B/cjrXYudKfwViM+BfWxwaI39YR6u0MXrlbkqeriix+ZqQM1wY/LXaSEQu/QS3 v7i7lZfZ/HOOtjk1/9Edv59aJDRUYnJJuKDVGuNLxicwuiXni3aLA6GhJ2iW5+21Cgob ZeV1MbV+iHYA1Pb9C0Si3n5ez5fcYyEM0wgdA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:date:content-type:x-mailer :content-transfer-encoding:message-id:mime-version; b=Lj2RQ6tDKo38hZBUZXB3l0Y23E9kxJkN0/93ka3oKDcZFWX15f05vwR7Puzezr/SWL 8cnogeKoxoV9HsbQJLIyqI7jurOHTEPCclxDWNNOYeknVFue6CTKZbOcNJ3Gf6kV28wq 84FPrjA/2JoF6aQKvlwaIdK73aqr3IqWJtGF4= Received: by 10.68.20.137 with SMTP id n9mr1814508pbe.121.1307924255745; Sun, 12 Jun 2011 17:17:35 -0700 (PDT) Received: from [192.168.11.6] (99-130-104-166.lightspeed.irvnca.sbcglobal.net [99.130.104.166]) by mx.google.com with ESMTPS id k9sm4162089pbc.6.2011.06.12.17.17.35 (version=SSLv3 cipher=OTHER); Sun, 12 Jun 2011 17:17:35 -0700 (PDT) Subject: [PATCH 2.6.38.7 1/3] xpad: common changes From: Chris Moeller To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org Date: Sun, 12 Jun 2011 17:17:34 -0700 X-Mailer: Evolution 3.0.2 (3.0.2-2.fc15) Message-ID: <1307924255.8254.9.camel@sabin.lan> Mime-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 13 Jun 2011 00:17:39 +0000 (UTC) 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 --- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- linux/drivers/input/joystick/xpad.c.orig 2011-06-11 19:49:56.964914370 -0700 +++ linux/drivers/input/joystick/xpad.c 2011-06-12 16:38:14.911710960 -0700 @@ -545,7 +542,7 @@ static int xpad_init_output(struct usb_i struct 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_i static 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);