Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 339930
b: refs/heads/master
c: d7aba55
h: refs/heads/master
v: v3
  • Loading branch information
Jon Hunter committed Nov 12, 2012
1 parent b5fac64 commit d8a3f1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 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: 4249d96ca35a765c25a70b7d29df5b6d80987c7f
refs/heads/master: d7aba5540d3f1aa2d7248d2f81506d994b25b327
14 changes: 4 additions & 10 deletions trunk/arch/arm/plat-omap/dmtimer.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
{
int ret;
char *parent_name = NULL;
struct clk *fclk, *parent;
struct clk *parent;
struct dmtimer_platform_data *pdata;

if (unlikely(!timer))
Expand All @@ -467,11 +467,8 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
if (pdata && pdata->set_timer_src)
return pdata->set_timer_src(timer->pdev, source);

fclk = clk_get(&timer->pdev->dev, "fck");
if (IS_ERR_OR_NULL(fclk)) {
pr_err("%s: fck not found\n", __func__);
if (!timer->fclk)
return -EINVAL;
}

switch (source) {
case OMAP_TIMER_SRC_SYS_CLK:
Expand All @@ -490,18 +487,15 @@ int omap_dm_timer_set_source(struct omap_dm_timer *timer, int source)
parent = clk_get(&timer->pdev->dev, parent_name);
if (IS_ERR_OR_NULL(parent)) {
pr_err("%s: %s not found\n", __func__, parent_name);
ret = -EINVAL;
goto out;
return -EINVAL;
}

ret = clk_set_parent(fclk, parent);
ret = clk_set_parent(timer->fclk, parent);
if (IS_ERR_VALUE(ret))
pr_err("%s: failed to set %s as parent\n", __func__,
parent_name);

clk_put(parent);
out:
clk_put(fclk);

return ret;
}
Expand Down

0 comments on commit d8a3f1f

Please sign in to comment.