[ARM] pxa: allow clk aliases

We need to support more than one name+device for a struct clk for a
small number of peripherals.  We do this by re-using struct clk alias
to another struct clk - IOW, if we find that the entry we're using is
an alias, we return the aliased entry not the one we found.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
This commit is contained in:
Russell King
2008-06-30 19:47:59 +01:00
committed by Russell King
parent 5e329d1c7f
commit bdb08cb2d3
3 changed files with 23 additions and 0 deletions

View File

@ -47,6 +47,9 @@ struct clk *clk_get(struct device *dev, const char *id)
clk = p;
mutex_unlock(&clocks_mutex);
if (!IS_ERR(clk) && clk->ops == NULL)
clk = clk->other;
return clk;
}
EXPORT_SYMBOL(clk_get);