From: Tony Lindgren Date: Mon, 3 Apr 2006 19:21:29 +0000 (-0700) Subject: ARM: OMAP: Fix clk_get() when using id and name X-Git-Tag: v2.6.16-omap1~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=20638e50e9c509432d5b17f01aaa22dbc9fc044c;p=linux-2.6-omap-h63xx.git 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: Tony Lindgren --- diff --git a/arch/arm/plat-omap/clock.c b/arch/arm/plat-omap/clock.c index ca16552d2c1..3d47bdcfb25 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;