summaryrefslogtreecommitdiffstats
path: root/include/linux/clk-provider.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2012-10-03 23:38:55 -0700
committerMike Turquette <mturquette@linaro.org>2012-10-29 11:05:03 -0700
commit2ac6b1f50a397580b8dc28f2833e54af7926fc71 (patch)
treed9fbe4f63392d462b41296b9407ec622d9212823 /include/linux/clk-provider.h
parent7ce3e8ccbac708229ba8c40c9c2a43ca7fcdb3ae (diff)
downloadblackbird-op-linux-2ac6b1f50a397580b8dc28f2833e54af7926fc71.tar.gz
blackbird-op-linux-2ac6b1f50a397580b8dc28f2833e54af7926fc71.zip
clk: Don't return negative numbers for unsigned values with !clk
Some of the helper functions return negative error codes if passed a NULL clock. This can lead to confusing behavior when the expected return value is unsigned. Fix up these accessors so that they return unsigned values (or bool in the case of is_enabled). This way we can't interpret NULL clocks as having valid and interesting values. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Mike Turquette <mturquette@linaro.org>
Diffstat (limited to 'include/linux/clk-provider.h')
-rw-r--r--include/linux/clk-provider.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index e1d83b187df2..0dce3d31eae5 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -339,11 +339,11 @@ const char *__clk_get_name(struct clk *clk);
struct clk_hw *__clk_get_hw(struct clk *clk);
u8 __clk_get_num_parents(struct clk *clk);
struct clk *__clk_get_parent(struct clk *clk);
-inline int __clk_get_enable_count(struct clk *clk);
-inline int __clk_get_prepare_count(struct clk *clk);
+inline unsigned int __clk_get_enable_count(struct clk *clk);
+inline unsigned int __clk_get_prepare_count(struct clk *clk);
unsigned long __clk_get_rate(struct clk *clk);
unsigned long __clk_get_flags(struct clk *clk);
-int __clk_is_enabled(struct clk *clk);
+bool __clk_is_enabled(struct clk *clk);
struct clk *__clk_lookup(const char *name);
/*
OpenPOWER on IntegriCloud