All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] kobject: Add kobject_initialized() function
@ 2014-10-28 15:26 Tomeu Vizoso
  2014-10-28 15:26 ` [PATCH 2/2] cpufreq: Guard against not-yet-initialized policies in cpufreq_cpu_get Tomeu Vizoso
  2014-10-29  2:43 ` [PATCH 1/2] kobject: Add kobject_initialized() function Greg Kroah-Hartman
  0 siblings, 2 replies; 8+ messages in thread
From: Tomeu Vizoso @ 2014-10-28 15:26 UTC (permalink / raw)
  To: linux-kernel; +Cc: Javier Martinez Canillas, Tomeu Vizoso, Greg Kroah-Hartman

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-11-10  9:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-28 15:26 [PATCH 1/2] kobject: Add kobject_initialized() function Tomeu Vizoso
2014-10-28 15:26 ` [PATCH 2/2] cpufreq: Guard against not-yet-initialized policies in cpufreq_cpu_get Tomeu Vizoso
2014-10-29  2:44   ` Greg KH
2014-10-29 15:45     ` [PATCH v2] cpufreq: Guard against not-yet-initialized policies in cpufreq_cpu_get() Tomeu Vizoso
2014-10-29 21:24       ` Rafael J. Wysocki
2014-10-31  8:53         ` Tomeu Vizoso
2014-11-10  9:54       ` Viresh Kumar
2014-10-29  2:43 ` [PATCH 1/2] kobject: Add kobject_initialized() function Greg Kroah-Hartman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.