Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350733
b: refs/heads/master
c: 1a3cd18
h: refs/heads/master
i:
  350731: 543122c
v: v3
  • Loading branch information
James Hogan authored and Mike Turquette committed Jan 18, 2013
1 parent 5b3a8f8 commit 6aefe18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 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: eb8b8f2e7164b819ca35a3d6240198fdb98d0ef3
refs/heads/master: 1a3cd18475a98b9587a181b8d8ebc7f5cdedb4b0
6 changes: 3 additions & 3 deletions trunk/drivers/clk/clk-divider.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/io.h>
#include <linux/err.h>
#include <linux/string.h>
#include <linux/log2.h>

/*
* DOC: basic adjustable divider clock that cannot gate
Expand All @@ -29,8 +30,7 @@

#define to_clk_divider(_hw) container_of(_hw, struct clk_divider, hw)

#define div_mask(d) ((1 << (d->width)) - 1)
#define is_power_of_two(i) !(i & ~i)
#define div_mask(d) ((1 << ((d)->width)) - 1)

static unsigned int _get_table_maxdiv(const struct clk_div_table *table)
{
Expand Down Expand Up @@ -137,7 +137,7 @@ static bool _is_valid_table_div(const struct clk_div_table *table,
static bool _is_valid_div(struct clk_divider *divider, unsigned int div)
{
if (divider->flags & CLK_DIVIDER_POWER_OF_TWO)
return is_power_of_two(div);
return is_power_of_2(div);
if (divider->table)
return _is_valid_table_div(divider->table, div);
return true;
Expand Down

0 comments on commit 6aefe18

Please sign in to comment.