summaryrefslogtreecommitdiff
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-29 10:52:00 -0500
committerRob Herring <robh@kernel.org>2023-04-13 17:46:15 -0500
commit82174a0a9c5cf36a3e421fc1d2c86998d8023f61 (patch)
treedd8dcb336931639fcbe481738c18601faf2431a8 /include/linux/of.h
parent4c32fb7dcf65b16cc7b2837ccfc35d00be92bddb (diff)
of: Move of_device_get_match_data() declaration
of_device.h mostly defines functions for bus drivers whereas of_device_get_match_data() is used by drivers. Let's move it to of.h. Link: https://lore.kernel.org/r/20230329-dt-cpu-header-cleanups-v1-3-581e2605fe47@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 36cf94596eba..6dc47d4c4612 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -371,6 +371,7 @@ extern int of_n_addr_cells(struct device_node *np);
extern int of_n_size_cells(struct device_node *np);
extern const struct of_device_id *of_match_node(
const struct of_device_id *matches, const struct device_node *node);
+extern const void *of_device_get_match_data(const struct device *dev);
extern int of_modalias_node(struct device_node *node, char *modalias, int len);
extern void of_print_phandle_args(const char *msg, const struct of_phandle_args *args);
extern int __of_parse_phandle_with_args(const struct device_node *np,
@@ -852,6 +853,11 @@ static inline phys_addr_t of_dma_get_max_cpu_address(struct device_node *np)
return PHYS_ADDR_MAX;
}
+static inline const void *of_device_get_match_data(const struct device *dev)
+{
+ return NULL;
+}
+
#define of_match_ptr(_ptr) NULL
#define of_match_node(_matches, _node) NULL
#endif /* CONFIG_OF */