summaryrefslogtreecommitdiff
path: root/include/linux/component.h
diff options
context:
space:
mode:
authorYong Wu <yong.wu@mediatek.com>2022-02-14 14:07:57 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-02-25 12:16:12 +0100
commit2502960fba7e94e090112069694365295c32ccc5 (patch)
treea2b68a46e1c3b115f90f1e99ff543333d102eb75 /include/linux/component.h
parent36744c117ab4e3d7e114c10d66882c418ba6ea8a (diff)
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.h6
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 *);