summaryrefslogtreecommitdiff
path: root/include/clk.h
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2022-01-16 01:25:04 +0300
committerSean Anderson <seanga2@gmail.com>2022-03-30 20:02:55 +0300
commitac15e789caecec19d29ee9c5869305d3c3ddfb42 (patch)
tree1f6eb51df9cbb9da87a208b5f1c46a1d2d4797af /include/clk.h
parent3cbdd4cab951b8bd3f2e76066e6911f9780c4eb1 (diff)
downloadu-boot-ac15e789caecec19d29ee9c5869305d3c3ddfb42.tar.xz
clk: Make clk_free return void
Most callers of this function do not check the return value, and it is unclear what action they should take if it fails. If a function is freeing multiple clocks, it should not stop just because the first one failed. Since the callbacks can no longer fail, just convert the return type to void. Signed-off-by: Sean Anderson <seanga2@gmail.com> Link: https://lore.kernel.org/r/20220115222504.617013-8-seanga2@gmail.com
Diffstat (limited to 'include/clk.h')
-rw-r--r--include/clk.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/clk.h b/include/clk.h
index 23e4d4ea72..76bb64bb5e 100644
--- a/include/clk.h
+++ b/include/clk.h
@@ -414,9 +414,9 @@ int clk_request(struct udevice *dev, struct clk *clk);
* @clk: A clock struct that was previously successfully requested by
* clk_request/get_by_*().
*
- * Return: 0 if OK, or a negative error code.
+ * Free resources allocated by clk_request() (or any clk_get_* function).
*/
-int clk_free(struct clk *clk);
+void clk_free(struct clk *clk);
/**
* clk_get_rate() - Get current clock rate.
@@ -562,9 +562,9 @@ static inline int clk_request(struct udevice *dev, struct clk *clk)
return -ENOSYS;
}
-static inline int clk_free(struct clk *clk)
+static inline void clk_free(struct clk *clk)
{
- return 0;
+ return;
}
static inline ulong clk_get_rate(struct clk *clk)