From: Tony Lindgren Date: Sun, 9 Apr 2006 21:21:05 +0000 (+0100) Subject: [ARM] 3461/1: ARM: OMAP: Fix clk_get() when using id and name X-Git-Tag: v2.6.17-rc2~284^2~6 X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=67d4d8352b5a78df422a956657d9be4b860680ab;hp=50e5629aa956c8c82015c90554a9a3fbf54cb404;p=linux-2.6-omap-h63xx.git [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 Signed-off-by: Russell King --- diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index 06485c193ee..32ec04c58bc 100644 --- a/arch/arm/plat-omap/clock.c +++ b/arch/arm/plat-omap/clock.c @@ -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;