]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - include/clk.h
travisci: Add support for ARC
[people/ms/u-boot.git] / include / clk.h
index 161bc2825fc0f77f3281035271cb736651bf4990..5a5c2ff1e674875dfd6ba999addf73baae231d3a 100644 (file)
@@ -9,6 +9,7 @@
 #ifndef _CLK_H_
 #define _CLK_H_
 
+#include <linux/errno.h>
 #include <linux/types.h>
 
 /**
@@ -59,7 +60,7 @@ struct clk {
        unsigned long id;
 };
 
-#if CONFIG_IS_ENABLED(OF_CONTROL)
+#if CONFIG_IS_ENABLED(OF_CONTROL) && CONFIG_IS_ENABLED(CLK)
 struct phandle_2_cell;
 int clk_get_by_index_platdata(struct udevice *dev, int index,
                              struct phandle_2_cell *cells, struct clk *clk);
@@ -104,7 +105,7 @@ static inline int clk_get_by_index(struct udevice *dev, int index,
        return -ENOSYS;
 }
 
-static int clk_get_by_name(struct udevice *dev, const char *name,
+static inline int clk_get_by_name(struct udevice *dev, const char *name,
                           struct clk *clk)
 {
        return -ENOSYS;