Commit 651d7ed2 authored by Patrick Mochel's avatar Patrick Mochel

[kobject] Add set_kset_name

Shorthand macro for initializing only the name of an embedded kset in an 
object.
parent fab97929
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment