public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usbip: change dev_attr_group to constant
@ 2011-05-30 19:50 Németh Márton
  0 siblings, 0 replies; only message in thread
From: Németh Márton @ 2011-05-30 19:50 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Matt Mooney, Max Vozeler, Arnd Bergmann,
	usbip-devel, devel
  Cc: LKML

From: Márton Németh <nm127@freemail.hu>

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.

Signed-off-by: Márton Németh <nm127@freemail.hu>
---
diff --git a/drivers/staging/usbip/vhci.h b/drivers/staging/usbip/vhci.h
index d5bc8e7..a208ef0 100644
--- a/drivers/staging/usbip/vhci.h
+++ b/drivers/staging/usbip/vhci.h
@@ -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 */
diff --git a/drivers/staging/usbip/vhci_sysfs.c b/drivers/staging/usbip/vhci_sysfs.c
index d9736f9..0cd039b 100644
--- a/drivers/staging/usbip/vhci_sysfs.c
+++ b/drivers/staging/usbip/vhci_sysfs.c
@@ -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,
 };

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-30 19:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-30 19:50 [PATCH] usbip: change dev_attr_group to constant Németh Márton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox