From patchwork Wed Jul 5 11:38:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9826363 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 72A1B60237 for ; Wed, 5 Jul 2017 11:38:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 61171283D0 for ; Wed, 5 Jul 2017 11:38:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 55B8528434; Wed, 5 Jul 2017 11:38:22 +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 ED213283D0 for ; Wed, 5 Jul 2017 11:38:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751923AbdGELiU (ORCPT ); Wed, 5 Jul 2017 07:38:20 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:35116 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751772AbdGELiU (ORCPT ); Wed, 5 Jul 2017 07:38:20 -0400 Received: by mail-pf0-f195.google.com with SMTP id q85so5871774pfq.2; Wed, 05 Jul 2017 04:38:19 -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; bh=+dAjTXSN6o17GODgeyS/G7/nNCBTukpdJ6wTswxbFYA=; b=VgWh5kUltWCpiwcMkl3DKDRKwwYKoFckejXQHcggzmJV2OmS4e42/Ydscvnd4F8/JW DUI7VpbBxRS+Q4C6P1JOqjp8oeLh7biRHEHABFkHsAVA/Gtn8yaVGsfAwnRcXrJoG3fn uVYZXmibhZI55bG5MZgtLEjswUsKxo60i7tHHqRqD10iLvRGHuo4KJtLvsF49npIYGn9 WZcf7UmCSl1Mz3lw3j7Mynv6IpODn42qjmK20FP95Ef54UfwsldESTkMtQ87cp3IodQA afwhk7pbnlYNuhMrad6Oewe/jGUqcT57IPUjq1N5TgNlnB8n4714fVLAY0Dt/2PuITFh sgHw== 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; bh=+dAjTXSN6o17GODgeyS/G7/nNCBTukpdJ6wTswxbFYA=; b=pnKnJUDirk9bh2aja7xH4FI+kYzEy6lAF7l3EQPvsWOjDFVZ0Oyzgq8SYcD4tVCn3N GJUPNrVcXQThSYBG8u8KlHCPqGvw6XKziuHESd+Kl4mhEY6cLbBcQI9xLOIBF46LOfjv q74SXU9Inbl+7tmQ2aQ5hrpraVxUJuaPjs6k1t9r9grDor/C/qiMInTFgCFncdxoPGDo j2unHTlboTpaANUX8Ld5fwhJxv7n7zhLLs3jjjn3DRSmii+5SeoxCENhRLEtiTT4/p2C +cqBq+aO8pe36NeEubztM9OHkf4Cs0HB00Q5kktBcpsdtW3ylrUFcQ+SV9ygO2t5Z3dj Y1DA== X-Gm-Message-State: AIVw111vbUqc5R1UUc1KGjcZQE4LnsLgN4+n5hudjg92+FOsfhO4FqwI sSaJMtuFJpeqwQ== X-Received: by 10.98.23.3 with SMTP id 3mr20078257pfx.55.1499254699463; Wed, 05 Jul 2017 04:38:19 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id t4sm29452729pgs.22.2017.07.05.04.38.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Jul 2017 04:38:18 -0700 (PDT) From: Arvind Yadav To: dmitry.torokhov@gmail.com, linux@roeck-us.net Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] input: elants_i2c: constify attribute_group structures. Date: Wed, 5 Jul 2017 17:08:02 +0530 Message-Id: X-Mailer: git-send-email 1.9.1 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 attribute_groups are not supposed to change at runtime. All functions working with attribute_groups provided by work with const attribute_group. So mark the non-const structs as const. File size before: text data bss dec hex filename 9448 1008 0 10456 28d8 drivers/input/touchscreen/elants_i2c.o File size After adding 'const': text data bss dec hex filename 9496 944 0 10440 28c8 drivers/input/touchscreen/elants_i2c.o Signed-off-by: Arvind Yadav --- drivers/input/touchscreen/elants_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index 872750e..0f4cda7 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -1066,7 +1066,7 @@ static ssize_t elants_version_attribute_show(struct device *dev, NULL }; -static struct attribute_group elants_attribute_group = { +static const struct attribute_group elants_attribute_group = { .attrs = elants_attributes, };