]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/kobject.h
driver core: fix namespace issue with devices assigned to classes
[linux-2.6-omap-h63xx.git] / include / linux / kobject.h
index bcd9cd173c2c80ffce52af4ea925c24e7f22dc0f..d37cd7f10e3dfd955062c400641745ab6ef14eac 100644 (file)
@@ -47,6 +47,7 @@ enum kobject_action {
        KOBJ_UMOUNT     = (__force kobject_action_t) 0x05,      /* umount event for block devices (broken) */
        KOBJ_OFFLINE    = (__force kobject_action_t) 0x06,      /* device offline */
        KOBJ_ONLINE     = (__force kobject_action_t) 0x07,      /* device online */
+       KOBJ_MOVE       = (__force kobject_action_t) 0x08,      /* device move */
 };
 
 struct kobject {
@@ -73,9 +74,14 @@ extern void kobject_init(struct kobject *);
 extern void kobject_cleanup(struct kobject *);
 
 extern int __must_check kobject_add(struct kobject *);
+extern int __must_check kobject_shadow_add(struct kobject *, struct dentry *);
 extern void kobject_del(struct kobject *);
 
 extern int __must_check kobject_rename(struct kobject *, const char *new_name);
+extern int __must_check kobject_shadow_rename(struct kobject *kobj,
+                                               struct dentry *new_parent,
+                                               const char *new_name);
+extern int __must_check kobject_move(struct kobject *, struct kobject *);
 
 extern int __must_check kobject_register(struct kobject *);
 extern void kobject_unregister(struct kobject *);
@@ -83,6 +89,8 @@ extern void kobject_unregister(struct kobject *);
 extern struct kobject * kobject_get(struct kobject *);
 extern void kobject_put(struct kobject *);
 
+extern struct kobject *kobject_kset_add_dir(struct kset *kset,
+                                           struct kobject *, const char *);
 extern struct kobject *kobject_add_dir(struct kobject *, const char *);
 
 extern char * kobject_get_path(struct kobject *, gfp_t);
@@ -263,14 +271,21 @@ extern int __must_check subsys_create_file(struct subsystem * ,
                                        struct subsys_attribute *);
 
 #if defined(CONFIG_HOTPLUG)
-void kobject_uevent(struct kobject *kobj, enum kobject_action action);
+int kobject_uevent(struct kobject *kobj, enum kobject_action action);
+int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
+                       char *envp[]);
 
 int add_uevent_var(char **envp, int num_envp, int *cur_index,
                        char *buffer, int buffer_size, int *cur_len,
                        const char *format, ...)
        __attribute__((format (printf, 7, 8)));
 #else
-static inline void kobject_uevent(struct kobject *kobj, enum kobject_action action) { }
+static inline int kobject_uevent(struct kobject *kobj, enum kobject_action action)
+{ return 0; }
+static inline int kobject_uevent_env(struct kobject *kobj,
+                                     enum kobject_action action,
+                                     char *envp[])
+{ return 0; }
 
 static inline int add_uevent_var(char **envp, int num_envp, int *cur_index,
                                      char *buffer, int buffer_size, int *cur_len,