From 2294b3af05e9b3fe0b84a78971e709037bd7593c Mon Sep 17 00:00:00 2001 From: Sakari Ailus Date: Tue, 6 Jun 2017 12:37:39 +0300 Subject: device property: Introduce fwnode_device_is_available() Add fwnode_device_is_available() to tell whether the device corresponding to a certain fwnode_handle is available for use. Signed-off-by: Sakari Ailus Reviewed-by: Mika Westerberg Acked-by: Rob Herring Signed-off-by: Rafael J. Wysocki --- drivers/base/property.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'drivers/base/property.c') diff --git a/drivers/base/property.c b/drivers/base/property.c index e1a58ac8840e..b979f8a2f4fb 100644 --- a/drivers/base/property.c +++ b/drivers/base/property.c @@ -1021,6 +1021,16 @@ void fwnode_handle_put(struct fwnode_handle *fwnode) } EXPORT_SYMBOL_GPL(fwnode_handle_put); +/** + * fwnode_device_is_available - check if a device is available for use + * @fwnode: Pointer to the fwnode of the device. + */ +bool fwnode_device_is_available(struct fwnode_handle *fwnode) +{ + return fwnode_call_int_op(fwnode, device_is_available); +} +EXPORT_SYMBOL_GPL(fwnode_device_is_available); + /** * device_get_child_node_count - return the number of child nodes for device * @dev: Device to cound the child nodes for -- cgit v1.2.3