summaryrefslogtreecommitdiffstats
path: root/drivers/base/property.c
diff options
context:
space:
mode:
authorSinan Kaya <okaya@codeaurora.org>2017-12-13 08:20:49 +0100
committerVinod Koul <vinod.koul@intel.com>2017-12-13 09:40:57 +0100
commitb283f157611f129f5bbbf7d06f5af860d76797fd (patch)
treebf89e94e72184a1a7a703e0b9c2b96ebd91b988d /drivers/base/property.c
parentACPI / bus: Introduce acpi_get_match_data() function (diff)
downloadlinux-b283f157611f129f5bbbf7d06f5af860d76797fd.tar.xz
linux-b283f157611f129f5bbbf7d06f5af860d76797fd.zip
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 <okaya@codeaurora.org> Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/base/property.c')
-rw-r--r--drivers/base/property.c7
1 files changed, 7 insertions, 0 deletions
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);