|
@@ -2170,7 +2170,6 @@ void clk_hw_reparent(struct clk_hw *hw, struct clk_hw *new_parent)
|
|
|
bool clk_has_parent(struct clk *clk, struct clk *parent)
|
|
|
{
|
|
|
struct clk_core *core, *parent_core;
|
|
|
- unsigned int i;
|
|
|
|
|
|
/* NULL clocks should be nops, so return success if either is NULL. */
|
|
|
if (!clk || !parent)
|
|
@@ -2183,11 +2182,8 @@ bool clk_has_parent(struct clk *clk, struct clk *parent)
|
|
|
if (core->parent == parent_core)
|
|
|
return true;
|
|
|
|
|
|
- for (i = 0; i < core->num_parents; i++)
|
|
|
- if (strcmp(core->parent_names[i], parent_core->name) == 0)
|
|
|
- return true;
|
|
|
-
|
|
|
- return false;
|
|
|
+ return match_string(core->parent_names, core->num_parents,
|
|
|
+ parent_core->name) >= 0;
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(clk_has_parent);
|
|
|
|