diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2004-09-12 21:00:26 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2004-09-12 21:00:26 -0700 |
| commit | aaf87e481e621730cea49b0bc4270faa66400fac (patch) | |
| tree | d71ab1059667c4582fc425eb3362c6d305bc478f /include/linux/kobject.h | |
| parent | 8a690d16e64e76f884d74128dc10ac6b28c135d2 (diff) | |
| parent | 12025235884570ba7f02a6f427f973ac6be7ec54 (diff) | |
Merge kroah.com:/home/greg/linux/BK/bleed-2.6
into kroah.com:/home/greg/linux/BK/driver-2.6
Diffstat (limited to 'include/linux/kobject.h')
| -rw-r--r-- | include/linux/kobject.h | 35 |
1 files changed, 32 insertions, 3 deletions
diff --git a/include/linux/kobject.h b/include/linux/kobject.h index 331d25b9cc41..dfadbe4fa848 100644 --- a/include/linux/kobject.h +++ b/include/linux/kobject.h @@ -26,6 +26,9 @@ #define KOBJ_NAME_LEN 20 +/* counter to tag the hotplug event, read only except for the kobject core */ +extern u64 hotplug_seqnum; + struct kobject { char * k_name; char name[KOBJ_NAME_LEN]; @@ -59,9 +62,7 @@ extern void kobject_unregister(struct kobject *); extern struct kobject * kobject_get(struct kobject *); extern void kobject_put(struct kobject *); -extern void kobject_hotplug(const char *action, struct kobject *); - -extern char * kobject_get_path(struct kset *, struct kobject *, int); +extern char * kobject_get_path(struct kobject *, int); struct kobj_type { void (*release)(struct kobject *); @@ -234,5 +235,33 @@ struct subsys_attribute { extern int subsys_create_file(struct subsystem * , struct subsys_attribute *); extern void subsys_remove_file(struct subsystem * , struct subsys_attribute *); + +#ifdef CONFIG_HOTPLUG +extern void kobject_hotplug(const char *action, struct kobject *kobj); +#else +static inline void kobject_hotplug(const char *action, struct kobject *kobj) { } +#endif + + +#ifdef CONFIG_KOBJECT_UEVENT +extern int kobject_uevent(const char *signal, struct kobject *kobj, + struct attribute *attr); + +extern int kobject_uevent_atomic(const char *signal, struct kobject *kobj, + struct attribute *attr); +#else +static inline int kobject_uevent(const char *signal, struct kobject *kobj, + struct attribute *attr) +{ + return 0; +} + +static inline int kobject_uevent_atomic(const char *signal, struct kobject *kobj, + struct attribute *attr) +{ + return 0; +} +#endif + #endif /* __KERNEL__ */ #endif /* _KOBJECT_H_ */ |
