]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - include/linux/component.h
Merge tag 'armsoc-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[karo-tx-linux.git] / include / linux / component.h
index 71c434a6a5ee68166d96edebeea561aa0913bc8b..a559eebc0e0f5b32e6214955f7c54933ab38c79f 100644 (file)
@@ -1,24 +1,28 @@
 #ifndef COMPONENT_H
 #define COMPONENT_H
 
+#include <linux/stddef.h>
+
 struct device;
 
 struct component_ops {
-       int (*bind)(struct device *, struct device *, void *);
-       void (*unbind)(struct device *, struct device *, void *);
+       int (*bind)(struct device *comp, struct device *master,
+                   void *master_data);
+       void (*unbind)(struct device *comp, struct device *master,
+                      void *master_data);
 };
 
 int component_add(struct device *, const struct component_ops *);
 void component_del(struct device *, const struct component_ops *);
 
-int component_bind_all(struct device *, void *);
-void component_unbind_all(struct device *, void *);
+int component_bind_all(struct device *master, void *master_data);
+void component_unbind_all(struct device *master, void *master_data);
 
 struct master;
 
 struct component_master_ops {
-       int (*bind)(struct device *);
-       void (*unbind)(struct device *);
+       int (*bind)(struct device *master);
+       void (*unbind)(struct device *master);
 };
 
 void component_master_del(struct device *,
@@ -28,7 +32,17 @@ struct component_match;
 
 int component_master_add_with_match(struct device *,
        const struct component_master_ops *, struct component_match *);
-void component_match_add(struct device *, struct component_match **,
+void component_match_add_release(struct device *master,
+       struct component_match **matchptr,
+       void (*release)(struct device *, void *),
        int (*compare)(struct device *, void *), void *compare_data);
 
+static inline void component_match_add(struct device *master,
+       struct component_match **matchptr,
+       int (*compare)(struct device *, void *), void *compare_data)
+{
+       component_match_add_release(master, matchptr, NULL, compare,
+                                   compare_data);
+}
+
 #endif