[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:
committed by
Russell King
parent
5e329d1c7f
commit
bdb08cb2d3
@ -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);
|
||||
|
Reference in New Issue
Block a user