Thread (14 messages) 14 messages, 4 authors, 2009-06-03

[PATCH] ARM: Move clk_add_alias() to arch/arm/common/clkdev.c (Re: [PATCH 05/10] ARM: OMAP1: Make 770 LCD work)

STALE6333d

From: Tony Lindgren <tony@atomide.com>
Date: 2009-05-28 21:02:06
Also in: linux-omap

* Russell King - ARM Linux [off-list ref] [090528 12:53]:
On Thu, May 28, 2009 at 11:20:48AM -0700, Tony Lindgren wrote:
quoted
quoted
+int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
+	struct device *dev)
+{
+	struct clk *r = clk_get(dev, id);
+	struct clk_lookup *l;
+
+	if (!r)
+		return -ENODEV;
+
+	l = clkdev_alloc(r, alias, alias_dev_name);
+	clk_put(r);
+	if (!l)
+		return -ENODEV;
+	clkdev_add(l);
+	return 0;
+}
+EXPORT_SYMBOL(clk_add_alias);
Oh, and a really good thing to do would be to fix the error checking and
returning in there (why did I miss it in the original PXA version...)
How about this? The prototype is in clk.h now, is that OK?

Tony

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help