[RFC,PATCH 3/7 v2] arm/versatile: use generic struct clk
Russell King - ARM Linux
linux at arm.linux.org.uk
Tue Jan 12 11:25:39 EST 2010
On Tue, Jan 12, 2010 at 05:58:31PM +1100, Jeremy Kerr wrote:
> diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c
> index aae5bc0..71e7596 100644
> --- a/arch/arm/common/clkdev.c
> +++ b/arch/arm/common/clkdev.c
> @@ -85,11 +85,13 @@ struct clk *clk_get(struct device *dev, const char *con_id)
> }
> EXPORT_SYMBOL(clk_get);
>
> +#ifndef CONFIG_USE_COMMON_STRUCT_CLK
> void clk_put(struct clk *clk)
> {
> __clk_put(clk);
> }
> EXPORT_SYMBOL(clk_put);
> +#endif /* CONFIG_USE_COMMON_STRUCT_CLK */
This doesn't make any sense. What are you trying to do here?
The get/put operations go together as one logical set - that's why you
get both if you're using clkdev, and why you're asked to implement both
__clk_get() and __clk_put() in arch code to do whatever's necessary
with the clock.
Let me guess, and say that clk_put() is not a release method. It's a
method for drivers to say "I'm done with this clock" and for the arch
code to reverse the effects of __clk_get()/clk_get().
Currently, its only user is to balance module counts.
More information about the linux-arm-kernel
mailing list