Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1713844

[PATCH 09/30] Input: iatkbd: constify serio_device_id

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Arvind Yadav <arvind.yadav.cs@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 09/30] Input: iatkbd: constify serio_device_id
Date Thu, 17 Aug 2017 13:50:01 +0200
Message-ID <ufrtf-4hy-1@gated-at.bofh.it> (permalink)
References <ufrjz-4bT-9@gated-at.bofh.it>
X-Original-To dmitry.torokhov@gmail.com
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=jCj2HXPL+JkApp8zrBKO0RhEaIMtSWJcmTwKkdzg2nU=; b=ec+OPfJgl5Z08HYENwdSw/5joG9fcXy+nj2GShs4lcyPTnG7kFWptvtGXsQUuMqzFK SdA1cWyCqBvxnapW/37i7itEFUiN1/ZHlK86eAI0NidQ5RSxTVxhxhkoxJWRzAzT2oXZ vc8Dc2kbFCdaih1bscf480Exh1pu1sscSE32sQVWQ67cWUO265dxt9Cthy0uCagyFHu8 pUk+wBxiBY7WCbtOtW32YN9XBgdgnRnkseWQ+5hNQzSKh3HXB5/zPRr+q/b8iX5b3G7b eNtOHXoOhrcKeI4MrW3ROKSIFVLZCmMFhuM/C4tfYuNlm/LsMFC07colEDVcsqwkYshf nuDQ==
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=jCj2HXPL+JkApp8zrBKO0RhEaIMtSWJcmTwKkdzg2nU=; b=XkJUyLiEPd1TkCyHjLkVrwofbMLlSsUvt9x/C15TeVetwNl/t/e39QGyRCz8KtQjhO cXi7YTAe1bQFoB0CbT6DKCqjpD05YyM2341PF7CkGl1WOcI7xvqD8UMM6xV3CvgNylYJ PheLwHnXgMmh/MNtFtz7KmqPiQTx562jwv/n6lYYdfM2rb3JrzQ5oiGXxO3HV41O7m2h kDnoFHr+x529gO7n26rZA5qduyg0q/V8YlrroRWYaJGPR1f9el2t0C/Hr/icgExWdcs0 phX8BmTtf1WBvWAcIrH7NeuTj8soGbI2ZcMdBL7Xz5qs72oslQg/8tlcJQsiL8vQbvq0 qNfQ==
X-Gm-Message-State AHYfb5hcblZ74Io/V03Tk3sPibjL4obZzY11CWGXB1h1GGoJM6t8YRwe e170uIBNCG+9zWE3
X-Received by 10.98.42.9 with SMTP id q9mr5041078pfq.77.1502969977657; Thu, 17 Aug 2017 04:39:37 -0700 (PDT)
X-Mailer git-send-email 2.7.4
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 24
Organization linux.* mail to news gateway
X-Original-Cc linux-kernel@vger.kernel.org, linux-input@vger.kernel.org
X-Original-Date Thu, 17 Aug 2017 17:08:10 +0530
X-Original-Message-ID <1502969911-25408-10-git-send-email-arvind.yadav.cs@gmail.com>
X-Original-References <1502969911-25408-1-git-send-email-arvind.yadav.cs@gmail.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1713844

Show key headers only | View raw


serio_device_id are not supposed to change at runtime. All functions
working with serio_device_id provided by <linux/serio.h> work with
const serio_device_id. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/input/keyboard/atkbd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index ec876b5..7e75835 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -1270,7 +1270,7 @@ static int atkbd_reconnect(struct serio *serio)
 	return retval;
 }
 
-static struct serio_device_id atkbd_serio_ids[] = {
+static const struct serio_device_id atkbd_serio_ids[] = {
 	{
 		.type	= SERIO_8042,
 		.proto	= SERIO_ANY,
-- 
2.7.4

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/30] constify input serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:40 +0200
  [PATCH 02/30] Input: magellan: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:40 +0200
  [PATCH 09/30] Input: iatkbd: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 11/30] Input: lkkbd: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 25/30] Input: penmount: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 18/30] Input: dynapro: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 03/30] Input: spaceball: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 22/30] Input: hampshire: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 26/30] Input: touchit213: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 12/30] Input: newtonkbd: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 27/30] Input: touchright: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 08/30] Input: zhenhua: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 07/30] Input: warrior: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 17/30] Input: wacom_serial4: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 13/30] Input: stowaway: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 16/30] Input: serio: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 20/30] Input: fujitsu_ts: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 24/30] Input: mtouch: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 01/30] Input: iforce: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 14/30] Input: sunkbd: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 10/30] Input: hil_kbd: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 28/30] Input: touchwin: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 21/30] Input: gunze: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 30/30] Input: wacom_w8001: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 05/30] Input: stinger: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 23/30] Input: inexio: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 29/30] Input: tsc40: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  [PATCH 19/30] Input: elo: constify serio_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-17 13:50 +0200
  Re: [PATCH 00/30] constify input serio_device_id Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2017-08-20 18:40 +0200

csiph-web