Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1703915
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 10/11] usb: wusbcore: dev-sysfs: constify attribute_group structures. |
| Date | 2017-08-04 14:10 +0200 |
| Message-ID | <uaJAu-6MJ-45@gated-at.bofh.it> (permalink) |
| References | <uaJAt-6MJ-7@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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/wusbcore/dev-sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/wusbcore/dev-sysfs.c b/drivers/usb/wusbcore/dev-sysfs.c
index d4de56b..78212f8 100644
--- a/drivers/usb/wusbcore/dev-sysfs.c
+++ b/drivers/usb/wusbcore/dev-sysfs.c
@@ -114,7 +114,7 @@ static ssize_t wusb_ck_store(struct device *dev,
NULL,
};
-static struct attribute_group wusb_dev_attr_group = {
+static const struct attribute_group wusb_dev_attr_group = {
.name = NULL, /* we want them in the same directory */
.attrs = wusb_dev_attrs,
};
--
1.9.1
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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