Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2515739imu; Thu, 29 Nov 2018 06:16:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/X8YU3ImiUmHHABtkMJg+R0+ozWCS8liaowE4emgfgr1weeIBSow1mFr1OtE8IayuOGVoVn X-Received: by 2002:a17:902:142:: with SMTP id 60mr1687653plb.330.1543501016388; Thu, 29 Nov 2018 06:16:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543501016; cv=none; d=google.com; s=arc-20160816; b=0tnJ8Feuu23+Oe/PZIynnqKmTz5+8EL41DWPohIhktlI8gcvzWlvNQpttMkPdMHKHy TF+aTAj0KfjdF7EYqgT4rINFxhrVuAil/iYOQK9jvjaBTd5yi50CRLaHDIbGqPJi0r/4 EKpXRygzkiAncPqUFGo5rfSw7uKjwllmYlKlGKopMCox7tpirVui3o10IEwRlcHkvwJd Uxjqs8os5cJftkRalK4IvkGbVpcRZOXJ3U1PW4kQpXu0WF73UE5kWCR0CZsmOEPgb6dB fI/8CUo5ufS8YvF64dPkMRnea1D5Gw9OP0O8PTXPjrHhsAt4OiEk5GQ4+Z0RoM2X6s9A qwTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=SogFN/IWoQ+2DmnTbyzj5lpLf77FHpKaTCp5bizkulE=; b=TMmBWDk2LO8OSKwnbO9rPW3n/SnpXD/QiL32MrJm4LH8b+hGCTlR91w2osMdxCMHNd Rmu2/4yPLl3v4ZLjgvdxBNloffZcUbrdAzGbkzGG9NOBR3WEb5TRiCasPhN3W/3ZYpEe 8r5cvDBkwjDxg+u+mvqvuTBjw3ZBUejl34FqbwKVSlYLNxfmBdSEgM74DBvws0e4JF82 y6miidp4KBNBpIf8tkM+Uwfwk+08TCEQx7pZCubwcbAhZX3+ML7WRlStrvpP7kZobi2+ OgQo5K2zA1M5pVehzN/KQGvu0fVp4z3z1xaJzV0pmb1w8teY2qPSp/m7AR0pSSak8BMY KfWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=chKcyN+4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12si2106411pgh.289.2018.11.29.06.16.40; Thu, 29 Nov 2018 06:16:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=chKcyN+4; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729582AbeK3BUv (ORCPT + 99 others); Thu, 29 Nov 2018 20:20:51 -0500 Received: from mail.kernel.org ([198.145.29.99]:41946 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728241AbeK3BUv (ORCPT ); Thu, 29 Nov 2018 20:20:51 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8E887208E7; Thu, 29 Nov 2018 14:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1543500921; bh=kXfcLxMJRZk7uEO8YAmgqWDXsvIGtItcSYUq5kmaVJE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=chKcyN+4JnwqUu4vzB1CZHail6VhVP7IEkG0suoGO6O0jxc1nj9AWmXkR3hrZf1C2 x4Y6oY0Eeo6RRFzg/HHW2fOsGO2Z3xvdlNLkfXQtKPFedMl3uaymlUjNsbVCXVtQCI ImJxXJQC4L5mPQ50HZoPO0ehmz6lPBO8oi8iSbUw= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Pavel Rojtberg , Dmitry Torokhov , Sasha Levin Subject: [PATCH 3.18 52/83] Input: xpad - use correct product id for x360w controllers Date: Thu, 29 Nov 2018 15:12:10 +0100 Message-Id: <20181129140140.590308290@linuxfoundation.org> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181129140138.002176596@linuxfoundation.org> References: <20181129140138.002176596@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.18-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit b6fc513da50c5dbc457a8ad6b58b046a6a68fd9d ] currently the controllers get the same product id as the wireless receiver. However the controllers actually have their own product id. The patch makes the driver expose the same product id as the windows driver. This improves compatibility when running applications with WINE. see https://github.com/paroj/xpad/issues/54 Signed-off-by: Pavel Rojtberg Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/joystick/xpad.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index fa6c72657f96..b9f48d4e155a 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1379,6 +1379,12 @@ static int xpad_init_input(struct usb_xpad *xpad) input_dev->name = xpad->name; input_dev->phys = xpad->phys; usb_to_input_id(xpad->udev, &input_dev->id); + + if (xpad->xtype == XTYPE_XBOX360W) { + /* x360w controllers and the receiver have different ids */ + input_dev->id.product = 0x02a1; + } + input_dev->dev.parent = &xpad->intf->dev; input_set_drvdata(input_dev, xpad); -- 2.17.1