From patchwork Wed Jul 5 11:41:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9826367 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 1297B60237 for ; Wed, 5 Jul 2017 11:41:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0009B26BE9 for ; Wed, 5 Jul 2017 11:41:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E8FF72838F; Wed, 5 Jul 2017 11:41:42 +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 D601828434 for ; Wed, 5 Jul 2017 11:41:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751727AbdGELll (ORCPT ); Wed, 5 Jul 2017 07:41:41 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:33320 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbdGELlk (ORCPT ); Wed, 5 Jul 2017 07:41:40 -0400 Received: by mail-pg0-f65.google.com with SMTP id u62so31546436pgb.0; Wed, 05 Jul 2017 04:41:40 -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=BUf2piN8FUdCYYevrbaTSNz44awTIWEtM4hxsZflXGI=; b=WrUlMGD9yVsDnqcMo2w//4w7qbLtQFkG6xkn86EMPmk1/ei0R6VKKhH0PCpxxVdzCs WfKsnAvlUIkHTySgd6kp56mDVIvHyUjyVeAGrq7KRmIO6R3HyY9I9X7LmjaJd48OUhj3 6pTpmndOJCr+RnBbTfTK2kIBa38T398I8/8AcQeCu83ljCrfjBhw6ZdGmP0gaxk78Dep Dl6brSZkQblAM5LFHGk/ax+Wjy+nJIu7e+cvOSpP17rpfonU21y39kO4uOwHURxzXO4B dl/AqLq1IFU3m/PWhzwb/+ZoQzBAgrjNTRFU4dzvs4S4QeSOEVXqHjNVoHSD42XywPSk vGVg== 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=BUf2piN8FUdCYYevrbaTSNz44awTIWEtM4hxsZflXGI=; b=riA2AQp9rwPdGiul/ssxMAFI62MkaVnLn1yTnt5W8pXzf5J4afiWtrirFpNpHodDfY YJk7JUCZJmz2Zii48dQR5FAHOmp3mGPrp1pbESq/ZkuNIqFijAoMqRX4O91Ex+r0DJgp iq0BTsDkJqoQpAQ2g7JtxcVqlP8j4ShFk5+RuptUSQPzupjRw1TTd5ZhqR1MG29E0kMU uXS/WH+N/Yc3+NqxY8yjWIy3FtXl88m+Io+eMu/wNHZfivYvDtKXutGOXz017nsbf7cI qUNU6jQJ4u/JPXkXR/lifCcJQ35kbc7M+HkTEtnLhKQR2tU3JB3FoWCzP+AtpoygkpA4 qw0Q== X-Gm-Message-State: AIVw112N1WkGtxoSPE4cczzhbpEAsF23q+82YbddDOhLGNng8Q1KqHEc rbPQP2MJHnuC5IPL X-Received: by 10.84.164.193 with SMTP id l1mr21915357plg.106.1499254899571; Wed, 05 Jul 2017 04:41:39 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id m79sm51062745pfk.117.2017.07.05.04.41.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Jul 2017 04:41:38 -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: ads7846: constify attribute_group structures. Date: Wed, 5 Jul 2017 17:11:22 +0530 Message-Id: <45e77f7a38336caf2d91814f4926c35b94577109.1499254838.git.arvind.yadav.cs@gmail.com> 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 9086 624 0 9710 25ee drivers/input/touchscreen/ads7846.o File size After adding 'const': text data bss dec hex filename 9198 496 0 9694 25de drivers/input/touchscreen/ads7846.o Signed-off-by: Arvind Yadav --- drivers/input/touchscreen/ads7846.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index 735a0be..a2f45ae 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -499,7 +499,7 @@ static umode_t ads7846_is_visible(struct kobject *kobj, struct attribute *attr, NULL, }; -static struct attribute_group ads7846_attr_group = { +static const struct attribute_group ads7846_attr_group = { .attrs = ads7846_attributes, .is_visible = ads7846_is_visible, }; @@ -599,7 +599,7 @@ static ssize_t ads7846_disable_store(struct device *dev, NULL, }; -static struct attribute_group ads784x_attr_group = { +static const struct attribute_group ads784x_attr_group = { .attrs = ads784x_attributes, };