diff options
Diffstat (limited to 'include/linux/enclosure.h')
-rw-r--r-- | include/linux/enclosure.h | 11 |
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 | ||
83 | struct enclosure_component { | 83 | struct 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 { | |||
94 | struct enclosure_device { | 95 | struct 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 | ||
103 | static inline struct enclosure_device * | 104 | static inline struct enclosure_device * |
104 | to_enclosure_device(struct class_device *dev) | 105 | to_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 | ||
109 | static inline struct enclosure_component * | 110 | static inline struct enclosure_component * |
110 | to_enclosure_component(struct class_device *dev) | 111 | to_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 | } |