lkml.org 
[lkml]   [2014]   [Oct]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] kobject: Add kobject_initialized() function
Date
To be used by users of kobject to tell when one hasn't been initialized yet.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
include/linux/kobject.h | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index 2d61b90..6bb5a92 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -88,6 +88,11 @@ static inline const char *kobject_name(const struct kobject *kobj)
return kobj->name;
}

+static inline bool kobject_initialized(const struct kobject *kobj)
+{
+ return kobj->state_initialized;
+}
+
extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
extern __printf(3, 4) __must_check
int kobject_add(struct kobject *kobj, struct kobject *parent,
--
1.9.3


\
 
 \ /
  Last update: 2014-10-28 17:01    [W:0.234 / U:3.464 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site