Commit graph

3 commits

Author SHA1 Message Date
Stephen Boyd
64990c839b clk: Add devm_clk_get()
Add a resource managed clk_get() to simplify clock usage in
drivers. This allows driver authors to "get and forget" about
their clocks by automatically calling clk_put() when the driver
is detached. This also encourages clock consumers to use the
clk_get() API correctly by passing in a struct device as an
argument.

Change-Id: I1ed53cd3c26c0390fa30cd3c3dca14bcdd59939f
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
2013-02-25 11:29:27 -08:00
Russell King
e8bf8df9c2 CLKDEV: Fix clkdev return value for NULL clk case
clkdev may incorrectly cause a clkdev entry with a NULL clk to return
-ENOENT.  This is not the intention of this code; -ENOENT should only
be returned if the clock entry can not be found in the table.  Fix
this.

Reported-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2011-04-30 10:14:08 +01:00
Jean-Christop PLAGNIOL-VILLARD
6d803ba736 ARM: 6483/1: arm & sh: factorised duplicated clkdev.c
factorise some generic infrastructure to assist looking up struct clks
for the ARM & SH architecture.

as the code is identical at 99%

put the arch specific code for allocation as example in asm/clkdev.h

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-11-26 10:51:04 +00:00
Renamed from arch/arm/common/clkdev.c (Browse further)