aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/attribute_container.h
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@steeleye.com>2005-08-14 18:09:01 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-08-14 18:21:27 -0400
commitd0a7e574007fd547d72ec693bfa35778623d0738 (patch)
tree3457bdf4e8eaf870971aab03c99c31534ba85658 /include/linux/attribute_container.h
parent10c1b88987d618f4f89c10e11e574c76de73b5e7 (diff)
[SCSI] correct transport class abstraction to work outside SCSI
I recently tried to construct a totally generic transport class and found there were certain features missing from the current abstract transport class. Most notable is that you have to hang the data on the class_device but most of the API is framed in terms of the generic device, not the class_device. These changes are two fold - Provide the class_device to all of the setup and configure APIs - Provide and extra API to take the device and the attribute class and return the corresponding class_device Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/linux/attribute_container.h')
-rw-r--r--include/linux/attribute_container.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/linux/attribute_container.h b/include/linux/attribute_container.h
index af1010b6dab7..f54b05b052b3 100644
--- a/include/linux/attribute_container.h
+++ b/include/linux/attribute_container.h
@@ -11,10 +11,12 @@
11 11
12#include <linux/device.h> 12#include <linux/device.h>
13#include <linux/list.h> 13#include <linux/list.h>
14#include <linux/spinlock.h>
14 15
15struct attribute_container { 16struct attribute_container {
16 struct list_head node; 17 struct list_head node;
17 struct list_head containers; 18 struct list_head containers;
19 spinlock_t containers_lock;
18 struct class *class; 20 struct class *class;
19 struct class_device_attribute **attrs; 21 struct class_device_attribute **attrs;
20 int (*match)(struct attribute_container *, struct device *); 22 int (*match)(struct attribute_container *, struct device *);
@@ -62,12 +64,7 @@ int attribute_container_add_class_device_adapter(struct attribute_container *con
62 struct class_device *classdev); 64 struct class_device *classdev);
63void attribute_container_remove_attrs(struct class_device *classdev); 65void attribute_container_remove_attrs(struct class_device *classdev);
64void attribute_container_class_device_del(struct class_device *classdev); 66void attribute_container_class_device_del(struct class_device *classdev);
65 67struct class_device *attribute_container_find_class_device(struct attribute_container *, struct device *);
66
67
68
69
70
71struct class_device_attribute **attribute_container_classdev_to_attrs(const struct class_device *classdev); 68struct class_device_attribute **attribute_container_classdev_to_attrs(const struct class_device *classdev);
72 69
73#endif 70#endif