Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1703911

[PATCH 01/11] usb: atm: ueagle-atm: constify attribute_group structures.

From Arvind Yadav <arvind.yadav.cs@gmail.com>
Newsgroups linux.kernel
Subject [PATCH 01/11] usb: atm: ueagle-atm: constify attribute_group structures.
Date 2017-08-04 14:10 +0200
Message-ID <uaJAu-6MJ-39@gated-at.bofh.it> (permalink)
References <uaJAt-6MJ-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


attribute_group are not supposed to change at runtime. All functions
working with attribute_group provided by <linux/sysfs.h> work with
const attribute_group. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/usb/atm/ueagle-atm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index df67815..5f31d88 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -2522,7 +2522,7 @@ static int claim_interface(struct usb_device *usb_dev,
 	&dev_attr_stat_firmid.attr,
 	NULL,
 };
-static struct attribute_group attr_grp = {
+static const struct attribute_group attr_grp = {
 	.attrs = attrs,
 };
 
-- 
1.9.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/11] constify usb attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
  [PATCH 08/11] usb: phy-tahvo: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
  [PATCH 11/11] usb: wusbcore: wusbhc: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
  [PATCH 01/11] usb: atm: ueagle-atm: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
  [PATCH 07/11] usb: phy-mv-usb: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
  [PATCH 04/11] usb: usbtmc: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
  [PATCH 10/11] usb: wusbcore: dev-sysfs: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
  [PATCH 09/11] usb: wusbcore: cbaf: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
  [PATCH 05/11] usb: hcd: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:10 +0200
  [PATCH 02/11] usb: chipidea: constify attribute_group structures. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-04 14:20 +0200

csiph-web