[ARM] 3461/1: ARM: OMAP: Fix clk_get() when using id and name
Patch from Tony Lindgren 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: Tony Lindgren <tony@atomide.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
parent
50e5629aa9
commit
67d4d8352b
|
@ -58,7 +58,7 @@ struct clk * clk_get(struct device *dev, const char *id)
|
||||||
if (p->id == idno &&
|
if (p->id == idno &&
|
||||||
strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
|
strcmp(id, p->name) == 0 && try_module_get(p->owner)) {
|
||||||
clk = p;
|
clk = p;
|
||||||
break;
|
goto found;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,6 +69,7 @@ struct clk * clk_get(struct device *dev, const char *id)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
found:
|
||||||
mutex_unlock(&clocks_mutex);
|
mutex_unlock(&clocks_mutex);
|
||||||
|
|
||||||
return clk;
|
return clk;
|
||||||
|
|
Loading…
Reference in New Issue