Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751794AbdGRILm (ORCPT ); Tue, 18 Jul 2017 04:11:42 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33010 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751724AbdGRILb (ORCPT ); Tue, 18 Jul 2017 04:11:31 -0400 From: Arvind Yadav To: david.kershner@unisys.com, gregkh@linuxfoundation.org, Timothy.Sell@unisys.com, bryan.thompson@unisys.com, jon.frisch@unisys.com, david.binder@unisys.com, sparmaintainer@unisys.com Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org Subject: [PATCH v4] staging: unisys: visorbus: Constify attribute_group structures. Date: Tue, 18 Jul 2017 13:40:54 +0530 Message-Id: <0e0fab8755868c167e689da7e92767cee7a321fc.1500364908.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1893 Lines: 54 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 --- Changes in v2: Change log typo was not correct. Changes in v3: merge conflict. Changes in v4: version change description was missing. drivers/staging/unisys/visorbus/visorbus_main.c | 4 ++-- drivers/staging/unisys/visorbus/visorchipset.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/unisys/visorbus/visorbus_main.c b/drivers/staging/unisys/visorbus/visorbus_main.c index 9012cc1..ff80ab2 100644 --- a/drivers/staging/unisys/visorbus/visorbus_main.c +++ b/drivers/staging/unisys/visorbus/visorbus_main.c @@ -294,7 +294,7 @@ static ssize_t typename_show(struct device *dev, struct device_attribute *attr, NULL }; -static struct attribute_group channel_attr_grp = { +static const struct attribute_group channel_attr_grp = { .name = "channel", .attrs = channel_attrs, }; @@ -391,7 +391,7 @@ static ssize_t channel_id_show(struct device *dev, NULL }; -static struct attribute_group dev_attr_grp = { +static const struct attribute_group dev_attr_grp = { .attrs = dev_attrs, }; diff --git a/drivers/staging/unisys/visorbus/visorchipset.c b/drivers/staging/unisys/visorbus/visorchipset.c index 87ea852..6d4498f 100644 --- a/drivers/staging/unisys/visorbus/visorchipset.c +++ b/drivers/staging/unisys/visorbus/visorchipset.c @@ -1138,7 +1138,7 @@ static ssize_t deviceenabled_store(struct device *dev, NULL }; -static struct attribute_group visorchipset_parahotplug_group = { +static const struct attribute_group visorchipset_parahotplug_group = { .name = "parahotplug", .attrs = visorchipset_parahotplug_attrs }; -- 1.9.1