]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] 3461/1: ARM: OMAP: Fix clk_get() when using id and name
authorTony Lindgren <tony@atomide.com>
Sun, 9 Apr 2006 21:21:05 +0000 (22:21 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 9 Apr 2006 21:21:05 +0000 (22:21 +0100)
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>
arch/arm/plat-omap/clock.c

index 06485c193ee37c7ec342b794120078321170ffae..32ec04c58bcd4fb66e4647d63c5cab6fbbb1e758 100644 (file)
@@ -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;