summaryrefslogtreecommitdiffstats
path: root/arch/arm/common
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2009-03-07 12:55:49 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2009-03-27 14:51:13 +0100
commit05fd8e73e1357feaea9c48938d937eae76b4aef4 (patch)
tree77aa0cfcfbd892423dcba295610116ca053029e2 /arch/arm/common
parenti.MX1: remove fb support from mach-imx (diff)
downloadlinux-05fd8e73e1357feaea9c48938d937eae76b4aef4.tar.xz
linux-05fd8e73e1357feaea9c48938d937eae76b4aef4.zip
clkdev: add possibility to get a clock based on the device name
This adds clk_get_sys to get a clock without the associated struct device. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/common')
-rw-r--r--arch/arm/common/clkdev.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c
index 1037bba18329..5589444ff437 100644
--- a/arch/arm/common/clkdev.c
+++ b/arch/arm/common/clkdev.c
@@ -62,9 +62,8 @@ static struct clk *clk_find(const char *dev_id, const char *con_id)
return clk;
}
-struct clk *clk_get(struct device *dev, const char *con_id)
+struct clk *clk_get_sys(const char *dev_id, const char *con_id)
{
- const char *dev_id = dev ? dev_name(dev) : NULL;
struct clk *clk;
mutex_lock(&clocks_mutex);
@@ -75,6 +74,14 @@ struct clk *clk_get(struct device *dev, const char *con_id)
return clk ? clk : ERR_PTR(-ENOENT);
}
+EXPORT_SYMBOL(clk_get_sys);
+
+struct clk *clk_get(struct device *dev, const char *con_id)
+{
+ const char *dev_id = dev ? dev_name(dev) : NULL;
+
+ return clk_get_sys(dev_id, con_id);
+}
EXPORT_SYMBOL(clk_get);
void clk_put(struct clk *clk)