diff options
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r-- | drivers/clk/clk.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 56e4495ebeb1..bbe52c4ae7ca 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c | |||
@@ -261,7 +261,7 @@ inline struct clk_hw *__clk_get_hw(struct clk *clk) | |||
261 | 261 | ||
262 | inline u8 __clk_get_num_parents(struct clk *clk) | 262 | inline u8 __clk_get_num_parents(struct clk *clk) |
263 | { | 263 | { |
264 | return !clk ? -EINVAL : clk->num_parents; | 264 | return !clk ? 0 : clk->num_parents; |
265 | } | 265 | } |
266 | 266 | ||
267 | inline struct clk *__clk_get_parent(struct clk *clk) | 267 | inline struct clk *__clk_get_parent(struct clk *clk) |
@@ -269,14 +269,14 @@ inline struct clk *__clk_get_parent(struct clk *clk) | |||
269 | return !clk ? NULL : clk->parent; | 269 | return !clk ? NULL : clk->parent; |
270 | } | 270 | } |
271 | 271 | ||
272 | inline int __clk_get_enable_count(struct clk *clk) | 272 | inline unsigned int __clk_get_enable_count(struct clk *clk) |
273 | { | 273 | { |
274 | return !clk ? -EINVAL : clk->enable_count; | 274 | return !clk ? 0 : clk->enable_count; |
275 | } | 275 | } |
276 | 276 | ||
277 | inline int __clk_get_prepare_count(struct clk *clk) | 277 | inline unsigned int __clk_get_prepare_count(struct clk *clk) |
278 | { | 278 | { |
279 | return !clk ? -EINVAL : clk->prepare_count; | 279 | return !clk ? 0 : clk->prepare_count; |
280 | } | 280 | } |
281 | 281 | ||
282 | unsigned long __clk_get_rate(struct clk *clk) | 282 | unsigned long __clk_get_rate(struct clk *clk) |
@@ -302,15 +302,15 @@ out: | |||
302 | 302 | ||
303 | inline unsigned long __clk_get_flags(struct clk *clk) | 303 | inline unsigned long __clk_get_flags(struct clk *clk) |
304 | { | 304 | { |
305 | return !clk ? -EINVAL : clk->flags; | 305 | return !clk ? 0 : clk->flags; |
306 | } | 306 | } |
307 | 307 | ||
308 | int __clk_is_enabled(struct clk *clk) | 308 | bool __clk_is_enabled(struct clk *clk) |
309 | { | 309 | { |
310 | int ret; | 310 | int ret; |
311 | 311 | ||
312 | if (!clk) | 312 | if (!clk) |
313 | return -EINVAL; | 313 | return false; |
314 | 314 | ||
315 | /* | 315 | /* |
316 | * .is_enabled is only mandatory for clocks that gate | 316 | * .is_enabled is only mandatory for clocks that gate |
@@ -323,7 +323,7 @@ int __clk_is_enabled(struct clk *clk) | |||
323 | 323 | ||
324 | ret = clk->ops->is_enabled(clk->hw); | 324 | ret = clk->ops->is_enabled(clk->hw); |
325 | out: | 325 | out: |
326 | return ret; | 326 | return !!ret; |
327 | } | 327 | } |
328 | 328 | ||
329 | static struct clk *__clk_lookup_subtree(const char *name, struct clk *clk) | 329 | static struct clk *__clk_lookup_subtree(const char *name, struct clk *clk) |
@@ -568,7 +568,7 @@ unsigned long __clk_round_rate(struct clk *clk, unsigned long rate) | |||
568 | unsigned long parent_rate = 0; | 568 | unsigned long parent_rate = 0; |
569 | 569 | ||
570 | if (!clk) | 570 | if (!clk) |
571 | return -EINVAL; | 571 | return 0; |
572 | 572 | ||
573 | if (!clk->ops->round_rate) { | 573 | if (!clk->ops->round_rate) { |
574 | if (clk->flags & CLK_SET_RATE_PARENT) | 574 | if (clk->flags & CLK_SET_RATE_PARENT) |