diff options
author | Tony Lindgren <tony@atomide.com> | 2016-01-25 21:46:21 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2016-01-25 21:46:21 +0300 |
commit | 7e3b1207705c10ada363bbc7d0235730ce1f5b79 (patch) | |
tree | cd1eb567acb4e72c1bdfbe8b59746c73b8627ee5 /include/linux/component.h | |
parent | 143c6fe3a415edf2dde3f507b3a00998b4c4001e (diff) | |
parent | 20437f79f6627a31752f422688a6047c25cefcf1 (diff) | |
download | linux-7e3b1207705c10ada363bbc7d0235730ce1f5b79.tar.xz |
Merge branch 'enable-devices' into omap-for-v4.5/fixes
Diffstat (limited to 'include/linux/component.h')
-rw-r--r-- | include/linux/component.h | 33 |
1 files changed, 21 insertions, 12 deletions
diff --git a/include/linux/component.h b/include/linux/component.h index c00dcc302611..a559eebc0e0f 100644 --- a/include/linux/component.h +++ b/include/linux/component.h @@ -1,39 +1,48 @@ #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 (*add_components)(struct device *, struct master *); - int (*bind)(struct device *); - void (*unbind)(struct device *); + int (*bind)(struct device *master); + void (*unbind)(struct device *master); }; -int component_master_add(struct device *, const struct component_master_ops *); void component_master_del(struct device *, const struct component_master_ops *); -int component_master_add_child(struct master *master, - int (*compare)(struct device *, void *), void *compare_data); - 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 |