Skip to contentSkip to conversation

usbip: change dev_attr_group to constant

PATCH New Németh Márton 1 participant 1 message May 30, 2011 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usbip: change dev_attr_group to constant

From: Márton Németh <[email protected]>

The dev_attr_group variable is never changed and it is only passed
to the second parameter of sysfs_create_group() and sysfs_remove_group() functions. These functions are defined in linux/sysfs.h: the second parameter is a pointer to const in both cases.

---

drivers/staging/usbip/vhci.h +1 -1
index d5bc8e7..a208ef0 100644
@@ -105,7 +105,7 @@ struct vhci_hcd {
 };
 
 extern struct vhci_hcd *the_controller;
-extern struct attribute_group dev_attr_group;
+extern const struct attribute_group dev_attr_group;
 #define hardware (&the_controller->pdev.dev)
 
 /* vhci_hcd.c */
drivers/staging/usbip/vhci_sysfs.c +1 -1
index d9736f9..0cd039b 100644
@@ -239,6 +239,6 @@ static struct attribute *dev_attrs[] = {
 	NULL,
 };
 
-struct attribute_group dev_attr_group = {
+const struct attribute_group dev_attr_group = {
 	.attrs = dev_attrs,
 };