
24 Jul
2018
24 Jul
'18
1:48 a.m.
Hi Fabrice,
On 23 July 2018 at 06:35, Fabrice Gasnier fabrice.gasnier@st.com wrote:
add clk_valid() to check for optional clocks are valid.
Signed-off-by: Fabrice Gasnier fabrice.gasnier@st.com
include/clk.h | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/include/clk.h b/include/clk.h index 9a35764..71679a9 100644 --- a/include/clk.h +++ b/include/clk.h @@ -294,4 +294,14 @@ int clk_disable_bulk(struct clk_bulk *bulk);
int soc_clk_dump(void);
+/**
- clk_valid() - check if clk is valid
- @clk: the clock to check
- @return TRUE if valid, or FALSE
true / false
- */
+static inline bool clk_valid(struct clk *clk) +{
return !!clk->dev;
+}
#endif
1.9.1
Please can you add a call to this from test/dm/clk.c ?
Regards, Simon