]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[ARM] netx: fix simple clk API
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Sun, 30 Nov 2008 17:17:25 +0000 (17:17 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 30 Nov 2008 17:17:25 +0000 (17:17 +0000)
... to only return the framebuffer clock for the framebuffer device.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-netx/fb.c

index 24c79650f9f359cb0d87c7842f0c3b21db253bd0..8f1f992f002ee6804e19edf7cfd552a993f2f58d 100644 (file)
 #include <linux/dma-mapping.h>
 #include <linux/amba/bus.h>
 #include <linux/amba/clcd.h>
+#include <linux/err.h>
 
 #include <mach/netx-regs.h>
 #include <mach/hardware.h>
 
-struct clk {};
-
-static struct clk fb_clk;
-
 static struct clcd_panel *netx_panel;
 
 void netx_clcd_enable(struct clcd_fb *fb)
@@ -85,7 +82,7 @@ int clk_enable(struct clk *clk)
 
 struct clk *clk_get(struct device *dev, const char *id)
 {
-       return &fb_clk;
+       return dev && strcmp(dev_name(dev), "fb") == 0 ? NULL : ERR_PTR(-ENOENT);
 }
 
 void clk_put(struct clk *clk)