aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/enclosure.h
diff options
context:
space:
mode:
authorTony Jones <tonyj@suse.de>2008-02-21 18:13:36 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-19 22:10:33 -0400
commitee959b00c335d7780136c5abda37809191fe52c3 (patch)
tree7775f3b274fd8caf5e7e5154fea89e96f2babd94 /include/linux/enclosure.h
parent56d110e852b0b1c85ad6c9bfe1cb4473ceb16402 (diff)
SCSI: convert struct class_device to struct device
It's big, but there doesn't seem to be a way to split it up smaller... Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/enclosure.h')
-rw-r--r--include/linux/enclosure.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/enclosure.h b/include/linux/enclosure.h
index a5978f18ca40..4332442b1b57 100644
--- a/include/linux/enclosure.h
+++ b/include/linux/enclosure.h
@@ -82,7 +82,8 @@ struct enclosure_component_callbacks {
82 82
83struct enclosure_component { 83struct enclosure_component {
84 void *scratch; 84 void *scratch;
85 struct class_device cdev; 85 struct device cdev;
86 struct device *dev;
86 enum enclosure_component_type type; 87 enum enclosure_component_type type;
87 int number; 88 int number;
88 int fault; 89 int fault;
@@ -94,20 +95,20 @@ struct enclosure_component {
94struct enclosure_device { 95struct enclosure_device {
95 void *scratch; 96 void *scratch;
96 struct list_head node; 97 struct list_head node;
97 struct class_device cdev; 98 struct device edev;
98 struct enclosure_component_callbacks *cb; 99 struct enclosure_component_callbacks *cb;
99 int components; 100 int components;
100 struct enclosure_component component[0]; 101 struct enclosure_component component[0];
101}; 102};
102 103
103static inline struct enclosure_device * 104static inline struct enclosure_device *
104to_enclosure_device(struct class_device *dev) 105to_enclosure_device(struct device *dev)
105{ 106{
106 return container_of(dev, struct enclosure_device, cdev); 107 return container_of(dev, struct enclosure_device, edev);
107} 108}
108 109
109static inline struct enclosure_component * 110static inline struct enclosure_component *
110to_enclosure_component(struct class_device *dev) 111to_enclosure_component(struct device *dev)
111{ 112{
112 return container_of(dev, struct enclosure_component, cdev); 113 return container_of(dev, struct enclosure_component, cdev);
113} 114}