From b283f157611f129f5bbbf7d06f5af860d76797fd Mon Sep 17 00:00:00 2001 From: Sinan Kaya Date: Wed, 13 Dec 2017 02:20:49 -0500 Subject: device property: Introduce a common API to fetch device match data There is an OF/ACPI function to obtain the driver data. We want to hide OF/ACPI details from the device drivers and abstract following the device family of functions. Signed-off-by: Sinan Kaya Reviewed-by: Rob Herring Acked-by: Sakari Ailus Signed-off-by: Vinod Koul --- drivers/base/property.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'drivers/base') diff --git a/drivers/base/property.c b/drivers/base/property.c index 851b1b6596a4..09eaac9400ed 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -1340,3 +1340,10 @@ int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode, return fwnode_call_int_op(fwnode, graph_parse_endpoint, endpoint); } EXPORT_SYMBOL(fwnode_graph_parse_endpoint); + +void *device_get_match_data(struct device *dev) +{ + return fwnode_call_ptr_op(dev_fwnode(dev), device_get_match_data, + dev); +} +EXPORT_SYMBOL_GPL(device_get_match_data); -- cgit v1.2.3