diff options
author | Yong Wu <yong.wu@mediatek.com> | 2022-02-14 14:07:57 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-25 12:16:12 +0100 |
commit | 2502960fba7e94e090112069694365295c32ccc5 (patch) | |
tree | a2b68a46e1c3b115f90f1e99ff543333d102eb75 /include/linux/component.h | |
parent | 36744c117ab4e3d7e114c10d66882c418ba6ea8a (diff) | |
download | linux-2502960fba7e94e090112069694365295c32ccc5.tar.gz linux-2502960fba7e94e090112069694365295c32ccc5.tar.bz2 linux-2502960fba7e94e090112069694365295c32ccc5.zip |
component: Add common helper for compare/release functions
The component requires the compare/release functions, there are so many
copies in current kernel. Just define four common helpers for them.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Signed-off-by: Yong Wu <yong.wu@mediatek.com>
Link: https://lore.kernel.org/r/20220214060819.7334-2-yong.wu@mediatek.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/component.h')
-rw-r--r-- | include/linux/component.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/component.h b/include/linux/component.h index 7012569c6546..df4aa75c9e7c 100644 --- a/include/linux/component.h +++ b/include/linux/component.h @@ -82,6 +82,12 @@ struct component_master_ops { void (*unbind)(struct device *master); }; +/* A set helper functions for component compare/release */ +int component_compare_of(struct device *dev, void *data); +void component_release_of(struct device *dev, void *data); +int component_compare_dev(struct device *dev, void *data); +int component_compare_dev_name(struct device *dev, void *data); + void component_master_del(struct device *, const struct component_master_ops *); |