From c3cad7223488638ab56c20b2c29345487857bc5f Mon Sep 17 00:00:00 2001 From: Liu Ying Date: Tue, 29 Aug 2017 16:58:58 +0800 Subject: MLK-16290 drm: Add drm_of_component_probe_with_match() helper A component master may have both OF based and non-OF based components to be bound with. This patch adds a helper drm_of_component_probe_with_match() similar to drm_of_component_probe() so that the new helper may get an additional provided match pointer(contains match entries for non-OF based components) to support this case. Tested-by: Meng Mingming Signed-off-by: Liu Ying --- include/drm/drm_of.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'include/drm') diff --git a/include/drm/drm_of.h b/include/drm/drm_of.h index 4f835490d77a..c0bd3dff0191 100644 --- a/include/drm/drm_of.h +++ b/include/drm/drm_of.h @@ -4,6 +4,7 @@ #include +struct component_match; struct component_master_ops; struct component_match; struct device; @@ -20,6 +21,10 @@ void drm_of_component_match_add(struct device *master, struct component_match **matchptr, int (*compare)(struct device *, void *), struct device_node *node); +extern int drm_of_component_probe_with_match(struct device *dev, + struct component_match *match, + int (*compare_of)(struct device *, void *), + const struct component_master_ops *m_ops); int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *), const struct component_master_ops *m_ops); @@ -45,6 +50,14 @@ drm_of_component_match_add(struct device *master, { } +static int drm_of_component_probe_with_match(struct device *dev, + struct component_match *match, + int (*compare_of)(struct device *, void *), + const struct component_master_ops *m_ops) +{ + return -EINVAL; +} + static inline int drm_of_component_probe(struct device *dev, int (*compare_of)(struct device *, void *), -- cgit v1.2.3