[PATCH 01/19] clk: always define clk_prepare_enable/disable
Ahmad Fatoum
a.fatoum at pengutronix.de
Mon Jun 12 06:02:22 PDT 2023
clk_enable/clk_disable have stubs defined for !HAVE_CLK. By moving t
clk_prepare_enable/disable definitions, we can reuse them for the
prepare helpers as well.
Signed-off-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
include/linux/clk.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/linux/clk.h b/include/linux/clk.h
index c78132d40582..60534ddb732c 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -72,7 +72,6 @@ struct clk *clk_get(struct device *dev, const char *id);
* Returns success (0) or negative errno.
*/
int clk_enable(struct clk *clk);
-#define clk_prepare_enable(clk) clk_enable(clk)
/**
* clk_disable - inform the system when the clock source is no longer required.
@@ -87,7 +86,6 @@ int clk_enable(struct clk *clk);
* disabled.
*/
void clk_disable(struct clk *clk);
-#define clk_disable_unprepare(clk) clk_disable(clk)
/**
* clk_get_rate - obtain the current clock rate (in Hz) for a clock source.
@@ -206,6 +204,9 @@ static inline int clk_set_rate(struct clk *clk, unsigned long rate)
}
#endif
+#define clk_prepare_enable(clk) clk_enable(clk)
+#define clk_disable_unprepare(clk) clk_disable(clk)
+
static inline void clk_put(struct clk *clk)
{
}
--
2.39.2
More information about the barebox
mailing list