aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index a280ccc31a7..a62920beebc 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -411,9 +411,9 @@ static int _init_main_clk(struct omap_hwmod *oh)
411 return 0; 411 return 0;
412 412
413 c = omap_clk_get_by_name(oh->main_clk); 413 c = omap_clk_get_by_name(oh->main_clk);
414 WARN(IS_ERR(c), "omap_hwmod: %s: cannot clk_get main_clk %s\n", 414 WARN(!c, "omap_hwmod: %s: cannot clk_get main_clk %s\n",
415 oh->name, oh->main_clk); 415 oh->name, oh->main_clk);
416 if (IS_ERR(c)) 416 if (!c)
417 ret = -EINVAL; 417 ret = -EINVAL;
418 oh->_clk = c; 418 oh->_clk = c;
419 419
@@ -446,9 +446,9 @@ static int _init_interface_clks(struct omap_hwmod *oh)
446 continue; 446 continue;
447 447
448 c = omap_clk_get_by_name(os->clk); 448 c = omap_clk_get_by_name(os->clk);
449 WARN(IS_ERR(c), "omap_hwmod: %s: cannot clk_get " 449 WARN(!c, "omap_hwmod: %s: cannot clk_get interface_clk %s\n",
450 "interface_clk %s\n", oh->name, os->clk); 450 oh->name, os->clk);
451 if (IS_ERR(c)) 451 if (!c)
452 ret = -EINVAL; 452 ret = -EINVAL;
453 os->_clk = c; 453 os->_clk = c;
454 } 454 }
@@ -472,9 +472,9 @@ static int _init_opt_clks(struct omap_hwmod *oh)
472 472
473 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) { 473 for (i = oh->opt_clks_cnt, oc = oh->opt_clks; i > 0; i--, oc++) {
474 c = omap_clk_get_by_name(oc->clk); 474 c = omap_clk_get_by_name(oc->clk);
475 WARN(IS_ERR(c), "omap_hwmod: %s: cannot clk_get opt_clk " 475 WARN(!c, "omap_hwmod: %s: cannot clk_get opt_clk %s\n",
476 "%s\n", oh->name, oc->clk); 476 oh->name, oc->clk);
477 if (IS_ERR(c)) 477 if (!c)
478 ret = -EINVAL; 478 ret = -EINVAL;
479 oc->_clk = c; 479 oc->_clk = c;
480 } 480 }
@@ -495,7 +495,7 @@ static int _enable_clocks(struct omap_hwmod *oh)
495 495
496 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name); 496 pr_debug("omap_hwmod: %s: enabling clocks\n", oh->name);
497 497
498 if (oh->_clk && !IS_ERR(oh->_clk)) 498 if (oh->_clk)
499 clk_enable(oh->_clk); 499 clk_enable(oh->_clk);
500 500
501 if (oh->slaves_cnt > 0) { 501 if (oh->slaves_cnt > 0) {
@@ -503,7 +503,7 @@ static int _enable_clocks(struct omap_hwmod *oh)
503 struct omap_hwmod_ocp_if *os = oh->slaves[i]; 503 struct omap_hwmod_ocp_if *os = oh->slaves[i];
504 struct clk *c = os->_clk; 504 struct clk *c = os->_clk;
505 505
506 if (c && !IS_ERR(c) && (os->flags & OCPIF_SWSUP_IDLE)) 506 if (c && (os->flags & OCPIF_SWSUP_IDLE))
507 clk_enable(c); 507 clk_enable(c);
508 } 508 }
509 } 509 }
@@ -525,7 +525,7 @@ static int _disable_clocks(struct omap_hwmod *oh)
525 525
526 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name); 526 pr_debug("omap_hwmod: %s: disabling clocks\n", oh->name);
527 527
528 if (oh->_clk && !IS_ERR(oh->_clk)) 528 if (oh->_clk)
529 clk_disable(oh->_clk); 529 clk_disable(oh->_clk);
530 530
531 if (oh->slaves_cnt > 0) { 531 if (oh->slaves_cnt > 0) {
@@ -533,7 +533,7 @@ static int _disable_clocks(struct omap_hwmod *oh)
533 struct omap_hwmod_ocp_if *os = oh->slaves[i]; 533 struct omap_hwmod_ocp_if *os = oh->slaves[i];
534 struct clk *c = os->_clk; 534 struct clk *c = os->_clk;
535 535
536 if (c && !IS_ERR(c) && (os->flags & OCPIF_SWSUP_IDLE)) 536 if (c && (os->flags & OCPIF_SWSUP_IDLE))
537 clk_disable(c); 537 clk_disable(c);
538 } 538 }
539 } 539 }
@@ -1013,7 +1013,7 @@ static int _setup(struct omap_hwmod *oh)
1013 struct omap_hwmod_ocp_if *os = oh->slaves[i]; 1013 struct omap_hwmod_ocp_if *os = oh->slaves[i];
1014 struct clk *c = os->_clk; 1014 struct clk *c = os->_clk;
1015 1015
1016 if (!c || IS_ERR(c)) 1016 if (!c)
1017 continue; 1017 continue;
1018 1018
1019 if (os->flags & OCPIF_SWSUP_IDLE) { 1019 if (os->flags & OCPIF_SWSUP_IDLE) {