diff options
author | James Bottomley <James.Bottomley@steeleye.com> | 2005-08-14 18:09:01 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-08-14 18:21:27 -0400 |
commit | d0a7e574007fd547d72ec693bfa35778623d0738 (patch) | |
tree | 3457bdf4e8eaf870971aab03c99c31534ba85658 /include/linux/transport_class.h | |
parent | 10c1b88987d618f4f89c10e11e574c76de73b5e7 (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/transport_class.h')
-rw-r--r-- | include/linux/transport_class.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/include/linux/transport_class.h b/include/linux/transport_class.h index 87d98d1faefb..1d6cc22e5f42 100644 --- a/include/linux/transport_class.h +++ b/include/linux/transport_class.h | |||
@@ -12,11 +12,16 @@ | |||
12 | #include <linux/device.h> | 12 | #include <linux/device.h> |
13 | #include <linux/attribute_container.h> | 13 | #include <linux/attribute_container.h> |
14 | 14 | ||
15 | struct transport_container; | ||
16 | |||
15 | struct transport_class { | 17 | struct transport_class { |
16 | struct class class; | 18 | struct class class; |
17 | int (*setup)(struct device *); | 19 | int (*setup)(struct transport_container *, struct device *, |
18 | int (*configure)(struct device *); | 20 | struct class_device *); |
19 | int (*remove)(struct device *); | 21 | int (*configure)(struct transport_container *, struct device *, |
22 | struct class_device *); | ||
23 | int (*remove)(struct transport_container *, struct device *, | ||
24 | struct class_device *); | ||
20 | }; | 25 | }; |
21 | 26 | ||
22 | #define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) \ | 27 | #define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) \ |