From patchwork Sun Aug 6 07:41:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9883569 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E4B0B602B6 for ; Sun, 6 Aug 2017 07:43:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D4F992860D for ; Sun, 6 Aug 2017 07:43:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9F1F28645; Sun, 6 Aug 2017 07:43:19 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 533402860D for ; Sun, 6 Aug 2017 07:43:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751506AbdHFHnS (ORCPT ); Sun, 6 Aug 2017 03:43:18 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38667 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751179AbdHFHlt (ORCPT ); Sun, 6 Aug 2017 03:41:49 -0400 Received: by mail-pg0-f65.google.com with SMTP id 123so5831360pga.5; Sun, 06 Aug 2017 00:41:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/TW7QwjOG2yq9LNQe9gmGfQKYucnlmKHcpdIYB8I4d8=; b=Dp0Q7gw1ACeCRBycUUKp4wTzhNMfBFZbdILpCRgnBEsFqty70YYQ6udXb8gQkiQkrP wE/H5WpyKg8KIvNG/NfkshPN5eihc4T7yYyppWQTcXd18/s8EMNq9AJ/ID6Fm+BHs7oM T0bkvAwSCcOI9Icg/pj9p7Cle1GQqbt/vx5IJ5bsGk9u03FGjBf83ddcDHaHlDEkRQIY taH2X9EpvrcA+dA7jKEWC0l6iZ0wYmLi9uG+MdXyWETCTZUkKBoKbLA2txYb1vmgXjrn 0idSlYSI8X0jcRQm68OnhmPiC806JXl/R0i39rN7BHJbdTz7tWBtxulufd2Z1bMOU4Vt C0ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/TW7QwjOG2yq9LNQe9gmGfQKYucnlmKHcpdIYB8I4d8=; b=eeSoba+PJECSwhZ9t+wflAj71muxEcrFQxQci/yp4vVpjXbU1BDXERpMvysSg6NOY2 hLOlKuJpiBXKp8NfgXtUh/1j686b7+ICl9xshrkdc5GgH5XMmjd3R0/HGlqDid747F65 dhDyuqxCC+k3nAlwTE4OY6VOThcAeqTeCf+xVZJnfQ8Ga//0P55fCrlOGoQi6XWwojjr 5IE0tHyHD/qlSQJOypcU8N1+mI9f+LuVNXt9uWj3ys9UY0r7puyElIBRGE5R8iWVOrDA mu32qSw1QprgdxwxOq5i+ZCfAB+IChFM3NYBjxmEuNOhg7f209ELnal4dG/ooQlaUevP ZNbA== X-Gm-Message-State: AIVw110Xjdxh0CvW7OFuJPtsZTbhlo1hhDK1TVgV+q6O3zFSSwBdH9XI RhJFIDXBKcep4g== X-Received: by 10.84.194.131 with SMTP id h3mr9554417pld.82.1502005308383; Sun, 06 Aug 2017 00:41:48 -0700 (PDT) Received: from localhost.localdomain ([103.16.68.81]) by smtp.gmail.com with ESMTPSA id v11sm9166222pfl.101.2017.08.06.00.41.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 06 Aug 2017 00:41:47 -0700 (PDT) From: Arvind Yadav To: dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/8] Input: xpad: constify usb_device_id. Date: Sun, 6 Aug 2017 13:11:21 +0530 Message-Id: <1502005287-17705-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502005287-17705-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1502005287-17705-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by work with const usb_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/input/joystick/xpad.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/joystick/xpad.c b/drivers/input/joystick/xpad.c index 298a6ba..2578a76 100644 --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -408,7 +408,7 @@ static const signed short xpad_abs_triggers[] = { #define XPAD_XBOXONE_VENDOR(vend) \ { XPAD_XBOXONE_VENDOR_PROTOCOL(vend, 208) } -static struct usb_device_id xpad_table[] = { +static const struct usb_device_id xpad_table[] = { { USB_INTERFACE_INFO('X', 'B', 0) }, /* X-Box USB-IF not approved class */ XPAD_XBOX360_VENDOR(0x044f), /* Thrustmaster X-Box 360 controllers */ XPAD_XBOX360_VENDOR(0x045e), /* Microsoft X-Box 360 controllers */