Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 196211
b: refs/heads/master
c: 4d3ae5a
h: refs/heads/master
i:
  196209: d28ea53
  196207: 7cddfac
v: v3
  • Loading branch information
Benoit Cousson authored and Paul Walmsley committed May 20, 2010
1 parent 3f685ce commit acc95a2
Show file tree
Hide file tree
Showing 2 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: 682fdc96f3afb5ec34e4893fae41d09346d656ed
refs/heads/master: 4d3ae5a9a7b3685c6d260a82f4098145862b2cd3
26 changes: 13 additions & 13 deletions trunk/arch/arm/mach-omap2/omap_hwmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,9 +411,9 @@ static int _init_main_clk(struct omap_hwmod *oh)
return 0;

c = omap_clk_get_by_name(oh->main_clk);
WARN(IS_ERR(c), "omap_hwmod: %s: cannot clk_get main_clk %s\n",
WARN(!c, "omap_hwmod: %s: cannot clk_get main_clk %s\n",
oh->name, oh->main_clk);
if (IS_ERR(c))
if (!c)
ret = -EINVAL;
oh->_clk = c;

Expand Down Expand Up @@ -446,9 +446,9 @@ static int _init_interface_clks(struct omap_hwmod *oh)
continue;

c = omap_clk_get_by_name(os->clk);
WARN(IS_ERR(c), "omap_hwmod: %s: cannot clk_get "
"interface_clk %s\n", oh->name, os->clk);
if (IS_ERR(c))
WARN(!c, "omap_hwmod: %s: cannot clk_get interface_clk %s\n",
oh->name, os->clk);
if (!c)
ret = -EINVAL;
os->_clk = c;
}
Expand All @@ -472,9 +472,9 @@ static int _init_opt_clks(struct omap_hwmod *oh)

for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) {
c = omap_clk_get_by_name(oc->clk);
WARN(IS_ERR(c), "omap_hwmod: %s: cannot clk_get opt_clk "
"%s\n", oh->name, oc->clk);
if (IS_ERR(c))
WARN(!c, "omap_hwmod: %s: cannot clk_get opt_clk %s\n",
oh->name, oc->clk);
if (!c)
ret = -EINVAL;
oc->_clk = c;
}
Expand All @@ -495,15 +495,15 @@ static int _enable_clocks(struct omap_hwmod *oh)

pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name);

if (oh->_clk && !IS_ERR(oh->_clk))
if (oh->_clk)
clk_enable(oh->_clk);

if (oh->slaves_cnt > 0) {
for (i = 0; i < oh->slaves_cnt; i++) {
struct omap_hwmod_ocp_if *os = oh->slaves[i];
struct clk *c = os->_clk;

if (c && !IS_ERR(c) && (os->flags & OCPIF_SWSUP_IDLE))
if (c && (os->flags & OCPIF_SWSUP_IDLE))
clk_enable(c);
}
}
Expand All @@ -525,15 +525,15 @@ static int _disable_clocks(struct omap_hwmod *oh)

pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name);

if (oh->_clk && !IS_ERR(oh->_clk))
if (oh->_clk)
clk_disable(oh->_clk);

if (oh->slaves_cnt > 0) {
for (i = 0; i < oh->slaves_cnt; i++) {
struct omap_hwmod_ocp_if *os = oh->slaves[i];
struct clk *c = os->_clk;

if (c && !IS_ERR(c) && (os->flags & OCPIF_SWSUP_IDLE))
if (c && (os->flags & OCPIF_SWSUP_IDLE))
clk_disable(c);
}
}
Expand Down Expand Up @@ -1013,7 +1013,7 @@ static int _setup(struct omap_hwmod *oh)
struct omap_hwmod_ocp_if *os = oh->slaves[i];
struct clk *c = os->_clk;

if (!c || IS_ERR(c))
if (!c)
continue;

if (os->flags & OCPIF_SWSUP_IDLE) {
Expand Down

0 comments on commit acc95a2

Please sign in to comment.