From patchwork Wed Jul 5 10:41:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arvind Yadav X-Patchwork-Id: 9826323 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 9056E603B5 for ; Wed, 5 Jul 2017 10:41:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 826BE27F95 for ; Wed, 5 Jul 2017 10:41:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 775A828433; Wed, 5 Jul 2017 10:41:32 +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 6AC3227F95 for ; Wed, 5 Jul 2017 10:41:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752582AbdGEKla (ORCPT ); Wed, 5 Jul 2017 06:41:30 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35952 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752472AbdGEKl3 (ORCPT ); Wed, 5 Jul 2017 06:41:29 -0400 Received: by mail-pg0-f68.google.com with SMTP id u36so31244326pgn.3; Wed, 05 Jul 2017 03:41:29 -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=B2AUyYOZGtt3VdI13i/6jc+rGdLq4N7KLFJ0AgOZ8Ms=; b=Gn3bhMMG28jhiPEJCibUfPOYTf+MeNOOmUXUsb+ZAgbMiH2IHphrz9bRcATNc2L0ml DJhTryBdrvOEi07CTk7gVA80pBLYX37P1mkOmJ5GR+CYOnseMWPKdfI0MM/lcOnIKVuk l8kp002srHc1yydN0g68FkEaNQv46JH26Fqn4TEeCwVNk6y/to9Rs5FhAkGqU3cnjIlq l2Pt0rVf2XPPTst11xljJJpidCA5I7uUP5A0cQY/KFXSLdtvYpNSoXuuRIm1JA5BUD42 U6U0Va0YtctTDanFoh7UPMLUo8HQF6Sgj/+t7WciEcnbVbOacDMk27KCiEymWb64/OWS ifLw== 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=B2AUyYOZGtt3VdI13i/6jc+rGdLq4N7KLFJ0AgOZ8Ms=; b=YpFkAUkkEKvhCQy/YUtckJLPx4r+AeVMAMYbfTYF+amUayE2/IY1GDigm0HPLtO1DS tNfMMUknQohVZy8w8viVpquzjPBMiyO5uj7ZucZAtMNi0hc4s78Prp1qaMzHaSK1W1GB HbwjehAILbtwftYR1ZrKhCqy5iNs3go78Mljw0I9CDnUCel2pW2mjqNsO3HowFjY4C00 MTNOU/fevw16mZKZSC4Ukhj5bGgU/YQWB6iQbhpOnD2IZosiBB4jS3IAj8+5r1WDz8L6 Z46DjTpuR2TRWxqcRdCYT7G+DsLsEQTD6fJCWfen2Bl6zpF82atx0pvsaMiRyeqRnLk1 DPNg== X-Gm-Message-State: AIVw112us2g20Pw7z1kIPG93lntp0MozrDST1Idjy47uNcPuPptbzdM8 mO8Bj2RtZXoPbA== X-Received: by 10.84.218.204 with SMTP id g12mr21841275plm.153.1499251288742; Wed, 05 Jul 2017 03:41:28 -0700 (PDT) Received: from symbol-HP-Z420-Workstation.zebra.lan ([223.31.70.102]) by smtp.googlemail.com with ESMTPSA id o13sm21452830pgr.40.2017.07.05.03.41.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 05 Jul 2017 03:41:28 -0700 (PDT) From: Arvind Yadav To: dmitry.torokhov@gmail.com, Henk.Vergonet@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, usbb2k-api-dev@nongnu.org Subject: [PATCH] input: yealink: Constify attribute_group structures. Date: Wed, 5 Jul 2017 16:11:11 +0530 Message-Id: <36c5479a9df7ac0ef16cfd5556c96f894d1a927a.1499251200.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 6039 944 0 6983 1b47 drivers/input/misc/yealink.o File size After adding 'const': text data bss dec hex filename 6103 880 0 6983 1b47 drivers/input/misc/yealink.o Signed-off-by: Arvind Yadav --- drivers/input/misc/yealink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/yealink.c b/drivers/input/misc/yealink.c index 6e7ff95..a1e0ff5 100644 --- a/drivers/input/misc/yealink.c +++ b/drivers/input/misc/yealink.c @@ -798,7 +798,7 @@ static ssize_t store_ringtone(struct device *dev, NULL }; -static struct attribute_group yld_attr_group = { +static const struct attribute_group yld_attr_group = { .attrs = yld_attributes };