]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
ARM: OMAP: Fix clk_get() when using id and name
authorTony Lindgren <tony@atomide.com>
Mon, 3 Apr 2006 19:21:29 +0000 (12:21 -0700)
committerTony Lindgren <tony@atomide.com>
Mon, 3 Apr 2006 19:21:29 +0000 (12:21 -0700)
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>
arch/arm/plat-omap/clock.c

index ca16552d2c1643b7164aed4708cfe58e5b6a2be1..3d47bdcfb25ca42f9103602685de8e31c16151a8 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;