diff options
| author | Patrick Mochel <mochel@osdl.org> | 2003-06-09 02:41:22 -0700 |
|---|---|---|
| committer | Patrick Mochel <mochel@osdl.org> | 2003-06-09 02:41:22 -0700 |
| commit | 651d7ed273c8b08bae12928149e4b1dbc693e076 (patch) | |
| tree | 26f857d11ef02195242e5eb0a4245664ea9db51b | |
| parent | fab9792907faadd0803217fd73801b5f9eb29922 (diff) | |
[kobject] Add set_kset_name
Shorthand macro for initializing only the name of an embedded kset in an
object.
| -rw-r--r-- | include/linux/kobject.h | 8 |
1 files changed, 8 insertions, 0 deletions
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; |
