aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/enclosure.h
diff options
context:
space:
mode:
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}