Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
[safe/jmp/linux-2.6] / include / linux / enclosure.h
index a5978f1..90d1c21 100644 (file)
@@ -82,7 +82,8 @@ struct enclosure_component_callbacks {
 
 struct enclosure_component {
        void *scratch;
-       struct class_device cdev;
+       struct device cdev;
+       struct device *dev;
        enum enclosure_component_type type;
        int number;
        int fault;
@@ -94,20 +95,20 @@ struct enclosure_component {
 struct enclosure_device {
        void *scratch;
        struct list_head node;
-       struct class_device cdev;
+       struct device edev;
        struct enclosure_component_callbacks *cb;
        int components;
        struct enclosure_component component[0];
 };
 
 static inline struct enclosure_device *
-to_enclosure_device(struct class_device *dev)
+to_enclosure_device(struct device *dev)
 {
-       return container_of(dev, struct enclosure_device, cdev);
+       return container_of(dev, struct enclosure_device, edev);
 }
 
 static inline struct enclosure_component *
-to_enclosure_component(struct class_device *dev)
+to_enclosure_component(struct device *dev)
 {
        return container_of(dev, struct enclosure_component, cdev);
 }
@@ -121,8 +122,9 @@ enclosure_component_register(struct enclosure_device *, unsigned int,
                                 enum enclosure_component_type, const char *);
 int enclosure_add_device(struct enclosure_device *enclosure, int component,
                         struct device *dev);
-int enclosure_remove_device(struct enclosure_device *enclosure, int component);
-struct enclosure_device *enclosure_find(struct device *dev);
+int enclosure_remove_device(struct enclosure_device *, struct device *);
+struct enclosure_device *enclosure_find(struct device *dev,
+                                       struct enclosure_device *start);
 int enclosure_for_each_device(int (*fn)(struct enclosure_device *, void *),
                              void *data);