Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 308192
b: refs/heads/master
c: d4d7e3d
h: refs/heads/master
v: v3
  • Loading branch information
Mike Turquette committed Apr 24, 2012
1 parent c9d1fb4 commit ff778b3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7452b2191cd55fb3fd6ad65344466ddcdbe4676e
refs/heads/master: d4d7e3ddc76c5ae3b4fbd15cb6f30aa78c28d788
14 changes: 14 additions & 0 deletions trunk/drivers/clk/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,6 +1202,20 @@ void __clk_init(struct device *dev, struct clk *clk)
if (__clk_lookup(clk->name))
goto out;

/* check that clk_ops are sane. See Documentation/clk.txt */
if (clk->ops->set_rate &&
!(clk->ops->round_rate && clk->ops->recalc_rate)) {
pr_warning("%s: %s must implement .round_rate & .recalc_rate\n",
__func__, clk->name);
goto out;
}

if (clk->ops->set_parent && !clk->ops->get_parent) {
pr_warning("%s: %s must implement .get_parent & .set_parent\n",
__func__, clk->name);
goto out;
}

/* throw a WARN if any entries in parent_names are NULL */
for (i = 0; i < clk->num_parents; i++)
WARN(!clk->parent_names[i],
Expand Down

0 comments on commit ff778b3

Please sign in to comment.