summaryrefslogtreecommitdiff
path: root/include/linux/sysfs.h
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2006-11-20 17:07:51 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-12-01 14:52:01 -0800
commit8a82472f86bf693b8e91ed56c9ca4f62fbbdcfa3 (patch)
tree79d148ee548f4b57e6f5a4a69cf6cdb81e7a1bf2 /include/linux/sysfs.h
parentaf9e0765362151b27372c14d9d6dc417184182d3 (diff)
driver core: Introduce device_move(): move a device to a new parent.
Provide a function device_move() to move a device to a new parent device. Add auxilliary functions kobject_move() and sysfs_move_dir(). kobject_move() generates a new uevent of type KOBJ_MOVE, containing the previous path (DEVPATH_OLD) in addition to the usual values. For this, a new interface kobject_uevent_env() is created that allows to add further environmental data to the uevent at the kobject layer. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/sysfs.h')
-rw-r--r--include/linux/sysfs.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sysfs.h b/include/linux/sysfs.h
index 6d5c43d31de..2129d1b6c87 100644
--- a/include/linux/sysfs.h
+++ b/include/linux/sysfs.h
@@ -97,6 +97,9 @@ extern int __must_check
sysfs_rename_dir(struct kobject *, const char *new_name);
extern int __must_check
+sysfs_move_dir(struct kobject *, struct kobject *);
+
+extern int __must_check
sysfs_create_file(struct kobject *, const struct attribute *);
extern int __must_check
@@ -142,6 +145,11 @@ static inline int sysfs_rename_dir(struct kobject * k, const char *new_name)
return 0;
}
+static inline int sysfs_move_dir(struct kobject * k, struct kobject * new_parent)
+{
+ return 0;
+}
+
static inline int sysfs_create_file(struct kobject * k, const struct attribute * a)
{
return 0;