From 651d7ed273c8b08bae12928149e4b1dbc693e076 Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Mon, 9 Jun 2003 02:41:22 -0700 Subject: [kobject] Add set_kset_name Shorthand macro for initializing only the name of an embedded kset in an object. --- include/linux/kobject.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/linux/kobject.h') diff --git a/include/linux/kobject.h b/include/linux/kobject.h index c982391cf8d6..5d42248dd95f 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -118,6 +118,14 @@ static inline struct kobj_type * get_ktype(struct kobject * k) extern struct kobject * kset_find_obj(struct kset *, const char *); +/** + * Use this when initializing an embedded kset with no other + * fields to initialize. + */ +#define set_kset_name(str) .kset = { .kobj = { .name = str } } + + + struct subsystem { struct kset kset; struct rw_semaphore rwsem; -- cgit v1.2.3