summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2006-08-07 22:19:37 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2006-09-25 21:08:38 -0700
commitc205ef4880273d2de4ee5388d4e52227ff688cc4 (patch)
tree78e7cde849b9c40fd323b5550a8e64d5d169c55f /include
parenta2de48cace5d0993da6cfa28b276ae724dc3569b (diff)
Driver core: create devices/virtual/ tree
This change creates a devices/virtual/CLASS_NAME tree for struct devices that belong to a class, yet do not have a "real" struct device for a parent. It automatically creates the directories on the fly as needed. Cc: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/device.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 3400e09bf45..bbb0d6b5d23 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -149,6 +149,8 @@ struct class {
struct list_head interfaces;
struct semaphore sem; /* locks both the children and interfaces lists */
+ struct kobject *virtual_dir;
+
struct class_attribute * class_attrs;
struct class_device_attribute * class_dev_attrs;
struct device_attribute * dev_attrs;
@@ -291,7 +293,6 @@ extern struct class_device *class_device_create(struct class *cls,
__attribute__((format(printf,5,6)));
extern void class_device_destroy(struct class *cls, dev_t devt);
-
/* interface for exporting device attributes */
struct device_attribute {
struct attribute attr;
@@ -400,6 +401,8 @@ extern struct device *device_create(struct class *cls, struct device *parent,
__attribute__((format(printf,4,5)));
extern void device_destroy(struct class *cls, dev_t devt);
+extern int virtual_device_parent(struct device *dev);
+
/*
* Platform "fixup" functions - allow the platform to have their say
* about devices and actions that the general device layer doesn't