summaryrefslogtreecommitdiff
path: root/include/linux/kobject.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2004-03-10 21:21:13 -0800
committerGreg Kroah-Hartman <greg@kroah.com>2004-03-10 21:21:13 -0800
commit065f33482605e1bd2ee4967eb16fe0cd528e07c9 (patch)
tree15894452740485a737a69fb32c82364f65a446f1 /include/linux/kobject.h
parentbd37147c84ffa45219f05685b00df2ed4f3f088b (diff)
Kobject: add decl_subsys_name() macro for users who want to set the subsystem name
Diffstat (limited to 'include/linux/kobject.h')
-rw-r--r--include/linux/kobject.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 2b127488d33e..f32f39b4cce6 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -151,6 +151,14 @@ struct subsystem _name##_subsys = { \
.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, \
+ } \
+}
/**