Re: [PATCH] Driver Core update for 2.6.4

Greg KH
2004-03-16T01:14:41Z

ChangeSet 1.1608.84.9, 2004/03/11 13:21:13-08:00, greg@kroah.com

Kobject: add decl_subsys_name() macro for users who want to set the subsystem name

include/linux/kobject.h | 8 ++++++++
1 files changed, 8 insertions(+)

diff -Nru a/include/linux/kobject.h b/include/linux/kobject.h
--- a/include/linux/kobject.h Mon Mar 15 15:29:10 2004
+++ b/include/linux/kobject.h Mon Mar 15 15:29:10 2004
@@ -151,6 +151,14 @@
.hotplug_ops =_hotplug_ops, \
} \
}
+#define decl_subsys_name(_varname,_name,_type,_hotplug_ops) \
+struct subsystem _varname##_subsys = { \
+ .kset = { \
+ .kobj = { .name = __stringify(_name) }, \
+ .ktype = _type, \
+ .hotplug_ops =_hotplug_ops, \
+ } \
+}

/**