Commit 20638e50 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP: Fix clk_get() when using id and name

Recent change to use both id and name when available was
not necessarily returning the right clock as it also searched
for clock name afterwards. This caused MMC to break on H2 and
H3 boards.
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent a742e30b
......@@ -58,7 +58,7 @@ struct clk * clk_get(struct device *dev, const char *id)
if (p->id == idno &&
strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
clk = p;
break;
goto found;
}
}
......@@ -69,6 +69,7 @@ struct clk * clk_get(struct device *dev, const char *id)
}
}
found:
mutex_unlock(&clocks_mutex);
return clk;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment