aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h11
-rw-r--r--include/linux/kobject.h1
2 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 4bea53fe8f4c..914c1016dd8f 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -373,7 +373,6 @@ struct device {
373 struct device_private *p; 373 struct device_private *p;
374 374
375 struct kobject kobj; 375 struct kobject kobj;
376 unsigned uevent_suppress:1;
377 const char *init_name; /* initial name of the device */ 376 const char *init_name; /* initial name of the device */
378 struct device_type *type; 377 struct device_type *type;
379 378
@@ -465,6 +464,16 @@ static inline void dev_set_drvdata(struct device *dev, void *data)
465 dev->driver_data = data; 464 dev->driver_data = data;
466} 465}
467 466
467static inline unsigned int dev_get_uevent_suppress(const struct device *dev)
468{
469 return dev->kobj.uevent_suppress;
470}
471
472static inline void dev_set_uevent_suppress(struct device *dev, int val)
473{
474 dev->kobj.uevent_suppress = val;
475}
476
468static inline int device_is_registered(struct device *dev) 477static inline int device_is_registered(struct device *dev)
469{ 478{
470 return dev->kobj.state_in_sysfs; 479 return dev->kobj.state_in_sysfs;
diff --git a/include/linux/kobject.h b/include/linux/kobject.h
index c9c214d7bba2..58ae8e00fcdd 100644
--- a/include/linux/kobject.h
+++ b/include/linux/kobject.h
@@ -68,6 +68,7 @@ struct kobject {
68 unsigned int state_in_sysfs:1; 68 unsigned int state_in_sysfs:1;
69 unsigned int state_add_uevent_sent:1; 69 unsigned int state_add_uevent_sent:1;
70 unsigned int state_remove_uevent_sent:1; 70 unsigned int state_remove_uevent_sent:1;
71 unsigned int uevent_suppress:1;
71}; 72};
72 73
73extern int kobject_set_name(struct kobject *kobj, const char *name, ...) 74extern int kobject_set_name(struct kobject *kobj, const char *name, ...)