Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752769AbdHDMJh (ORCPT ); Fri, 4 Aug 2017 08:09:37 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:38347 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752568AbdHDMHZ (ORCPT ); Fri, 4 Aug 2017 08:07:25 -0400 From: Arvind Yadav To: Peter.Chen@nxp.com, balbi@kernel.org, baoyou.xie@linaro.org, castet.matthieu@free.fr, stf_xl@wp.pl, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Subject: [PATCH 04/11] usb: usbtmc: constify attribute_group structures. Date: Fri, 4 Aug 2017 17:36:40 +0530 Message-Id: <1501848407-21894-5-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1501848407-21894-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1501848407-21894-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 934 Lines: 33 attribute_group are not supposed to change at runtime. All functions working with attribute_group provided by work with const attribute_group. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/usb/class/usbtmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/class/usbtmc.c b/drivers/usb/class/usbtmc.c index 578f424..6ebfabf 100644 --- a/drivers/usb/class/usbtmc.c +++ b/drivers/usb/class/usbtmc.c @@ -1085,7 +1085,7 @@ static DEVICE_ATTR_RO(name) NULL, }; -static struct attribute_group capability_attr_grp = { +static const struct attribute_group capability_attr_grp = { .attrs = capability_attrs, }; @@ -1151,7 +1151,7 @@ static DEVICE_ATTR_RW(name) NULL, }; -static struct attribute_group data_attr_grp = { +static const struct attribute_group data_attr_grp = { .attrs = data_attrs, }; -- 1.9.1