Re: [PATCH] Driver Core update for 2.6.4

From: Greg KH
Date: Mon Mar 15 2004 - 20:18:36 EST


ChangeSet 1.1608.84.9, 2004/03/11 13:21:13-08:00, greg@xxxxxxxxx

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, \
+ } \
+}


/**

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/