Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1963729imm; Thu, 21 Jun 2018 05:14:34 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIlbiDOIkvTZJBlKtx0npcuzsC4kqP253ja1A2+pFdGd7HNq5CSko2bMwfABNw25qwzFQEu X-Received: by 2002:a62:8dd1:: with SMTP id p78-v6mr27276649pfk.141.1529583274839; Thu, 21 Jun 2018 05:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529583274; cv=none; d=google.com; s=arc-20160816; b=qFYK1yxnMEhl5DLioLHti8YxXcivIet1/rdC6aPdfJkrc5zrtgZVPcKKBvq7wsSqpx 2ozDMYU1wF7uvjrIh0DyuDeAhcGG7o/Ha6aM9RoCUZf+iLm2zc6zcmE+9nHIh89+qGct hCdGs8qrCk0aO1uytrswpBpzCxYXLcu72Qjrv1eQXO0Jhjo2g2+bEBxcWTk4mdNN1mbF iPrFQgbZNezu0mXnbPnY7HvxK/Bs27xvnb0LDqD7tFhRrBXOb2sSlKGmGbw4CWBNwRG0 Y6FAh815ENTsowJ/aE1XHTDHmNkhJPxwRSYaUZIuk8tokLTQi2P81jFbkDp6e6XtA4Cm JuJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=FPYUZKYAObRyLFIU3U2OHcFTegRC6rbOain1ysQnIRM=; b=OxcH2iu98thLgsTqpCKw5D/ggOXhHzDKxDg/Fu6QEnHJtKOn7/D6ghq18DqBXEZiz8 +UL2HLzqjSF6sDP2PE/+SHGJrYh5/Nx0091obM5k78PJoE4upNawsBgQxijvl/Pfxxx3 aeiExwt0Pa9ll8NLzcTzXCRSBRCJMtdABmVs3fURMB3hSkj2qo1LocjHhodayya3WB50 iuCPGtS28mDHvskSECkjs/9tGZzU1SXuUM6fkkWvSwhHq7c2JDy5emDUNDlgEajXdWF+ ClW+lsrqxpbqeSS9xfj4cro4rHQNbB3lgJcHQI5JMNmf9XO+1nc7bcghI9IvRY/AO7Al foZA== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y13-v6si4775613pfc.302.2018.06.21.05.14.21; Thu, 21 Jun 2018 05:14:34 -0700 (PDT) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933470AbeFUMLv (ORCPT + 99 others); Thu, 21 Jun 2018 08:11:51 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38474 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932763AbeFUMJR (ORCPT ); Thu, 21 Jun 2018 08:09:17 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7B8B54075656; Thu, 21 Jun 2018 12:09:16 +0000 (UTC) Received: from plouf.banquise.eu.com (ovpn-117-99.ams2.redhat.com [10.36.117.99]) by smtp.corp.redhat.com (Postfix) with ESMTP id 365692026D6B; Thu, 21 Jun 2018 12:09:15 +0000 (UTC) From: Benjamin Tissoires To: Jiri Kosina , Dmitry Torokhov Cc: Mario.Limonciello@dell.com, Peter Hutterer , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires Subject: [PATCH v3 02/12] HID: multitouch: make sure the static list of class is not changed Date: Thu, 21 Jun 2018 14:08:58 +0200 Message-Id: <20180621120908.16706-3-benjamin.tissoires@redhat.com> In-Reply-To: <20180621120908.16706-1-benjamin.tissoires@redhat.com> References: <20180621120908.16706-1-benjamin.tissoires@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 21 Jun 2018 12:09:16 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Thu, 21 Jun 2018 12:09:16 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'benjamin.tissoires@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org const is a magic keyword here :) Signed-off-by: Benjamin Tissoires --- no changes in v2 no changes in v3 --- drivers/hid/hid-multitouch.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index 45968f7970f8..91624a2240ca 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -211,7 +211,7 @@ static int cypress_compute_slot(struct mt_device *td) return -1; } -static struct mt_class mt_classes[] = { +static const struct mt_class mt_classes[] = { { .name = MT_CLS_DEFAULT, .quirks = MT_QUIRK_ALWAYS_VALID | MT_QUIRK_CONTACT_CNT_ACCURATE }, @@ -1432,7 +1432,7 @@ static int mt_probe(struct hid_device *hdev, const struct hid_device_id *id) { int ret, i; struct mt_device *td; - struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */ + const struct mt_class *mtclass = mt_classes; /* MT_CLS_DEFAULT */ for (i = 0; mt_classes[i].name ; i++) { if (id->driver_data == mt_classes[i].name) { -- 2.14.3