Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336468
b: refs/heads/master
c: 2ac6b1f
h: refs/heads/master
v: v3
  • Loading branch information
Stephen Boyd authored and Mike Turquette committed Oct 29, 2012
1 parent 59cae75 commit 8967d7f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ce3e8ccbac708229ba8c40c9c2a43ca7fcdb3ae
refs/heads/master: 2ac6b1f50a397580b8dc28f2833e54af7926fc71
20 changes: 10 additions & 10 deletions trunk/drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,22 +261,22 @@ inline struct clk_hw *__clk_get_hw(struct clk *clk)

inline u8 __clk_get_num_parents(struct clk *clk)
{
return !clk ? -EINVAL : clk->num_parents;
return !clk ? 0 : clk->num_parents;
}

inline struct clk *__clk_get_parent(struct clk *clk)
{
return !clk ? NULL : clk->parent;
}

inline int __clk_get_enable_count(struct clk *clk)
inline unsigned int __clk_get_enable_count(struct clk *clk)
{
return !clk ? -EINVAL : clk->enable_count;
return !clk ? 0 : clk->enable_count;
}

inline int __clk_get_prepare_count(struct clk *clk)
inline unsigned int __clk_get_prepare_count(struct clk *clk)
{
return !clk ? -EINVAL : clk->prepare_count;
return !clk ? 0 : clk->prepare_count;
}

unsigned long __clk_get_rate(struct clk *clk)
Expand All @@ -302,15 +302,15 @@ unsigned long __clk_get_rate(struct clk *clk)

inline unsigned long __clk_get_flags(struct clk *clk)
{
return !clk ? -EINVAL : clk->flags;
return !clk ? 0 : clk->flags;
}

int __clk_is_enabled(struct clk *clk)
bool __clk_is_enabled(struct clk *clk)
{
int ret;

if (!clk)
return -EINVAL;
return false;

/*
* .is_enabled is only mandatory for clocks that gate
Expand All @@ -323,7 +323,7 @@ int __clk_is_enabled(struct clk *clk)

ret = clk->ops->is_enabled(clk->hw);
out:
return ret;
return !!ret;
}

static struct clk *__clk_lookup_subtree(const char *name, struct clk *clk)
Expand Down Expand Up @@ -568,7 +568,7 @@ unsigned long __clk_round_rate(struct clk *clk, unsigned long rate)
unsigned long parent_rate = 0;

if (!clk)
return -EINVAL;
return 0;

if (!clk->ops->round_rate) {
if (clk->flags & CLK_SET_RATE_PARENT)
Expand Down
6 changes: 3 additions & 3 deletions trunk/include/linux/clk-provider.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/*
Expand Down

0 comments on commit 8967d7f

Please sign in to comment.