summaryrefslogtreecommitdiffstats
path: root/drivers/base/property.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-04-08 20:48:42 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2022-04-13 20:04:02 +0200
commit022fe6bc8f3bd0f2b1f9bc778bacc38020dfd420 (patch)
tree34bf886795882fb8836b18314e19fab4dd48e62a /drivers/base/property.c
parentdevice property: Introduce fwnode_for_each_parent_node() (diff)
downloadlinux-022fe6bc8f3bd0f2b1f9bc778bacc38020dfd420.tar.xz
linux-022fe6bc8f3bd0f2b1f9bc778bacc38020dfd420.zip
device property: Drop 'test' prefix in parameters of fwnode_is_ancestor_of()
The part 'is' in the function name implies the test against something. Drop unnecessary 'test' prefix in the fwnode_is_ancestor_of() parameters. No functional change intended. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/base/property.c')
-rw-r--r--drivers/base/property.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/base/property.c b/drivers/base/property.c
index f0ac31d28798..36401cfe432c 100644
--- a/drivers/base/property.c
+++ b/drivers/base/property.c
@@ -656,28 +656,26 @@ struct fwnode_handle *fwnode_get_nth_parent(struct fwnode_handle *fwnode,
EXPORT_SYMBOL_GPL(fwnode_get_nth_parent);
/**
- * fwnode_is_ancestor_of - Test if @test_ancestor is ancestor of @test_child
- * @test_ancestor: Firmware which is tested for being an ancestor
- * @test_child: Firmware which is tested for being the child
+ * fwnode_is_ancestor_of - Test if @ancestor is ancestor of @child
+ * @ancestor: Firmware which is tested for being an ancestor
+ * @child: Firmware which is tested for being the child
*
* A node is considered an ancestor of itself too.
*
- * Returns true if @test_ancestor is an ancestor of @test_child.
- * Otherwise, returns false.
+ * Returns true if @ancestor is an ancestor of @child. Otherwise, returns false.
*/
-bool fwnode_is_ancestor_of(struct fwnode_handle *test_ancestor,
- struct fwnode_handle *test_child)
+bool fwnode_is_ancestor_of(struct fwnode_handle *ancestor, struct fwnode_handle *child)
{
struct fwnode_handle *parent;
- if (IS_ERR_OR_NULL(test_ancestor))
+ if (IS_ERR_OR_NULL(ancestor))
return false;
- if (test_child == test_ancestor)
+ if (child == ancestor)
return true;
- fwnode_for_each_parent_node(test_child, parent) {
- if (parent == test_ancestor) {
+ fwnode_for_each_parent_node(child, parent) {
+ if (parent == ancestor) {
fwnode_handle_put(parent);
return true;
}