diff options
Diffstat (limited to 'arch/arm/mach-omap2/clock.c')
-rw-r--r-- | arch/arm/mach-omap2/clock.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/arm/mach-omap2/clock.c b/arch/arm/mach-omap2/clock.c index 1d891e4a6933..84cd1d9fcef9 100644 --- a/arch/arm/mach-omap2/clock.c +++ b/arch/arm/mach-omap2/clock.c | |||
@@ -251,7 +251,7 @@ int _omap2_clk_enable(struct clk *clk) | |||
251 | if (clk->enable) | 251 | if (clk->enable) |
252 | return clk->enable(clk); | 252 | return clk->enable(clk); |
253 | 253 | ||
254 | if (unlikely(clk->enable_reg == 0)) { | 254 | if (unlikely(clk->enable_reg == NULL)) { |
255 | printk(KERN_ERR "clock.c: Enable for %s without enable code\n", | 255 | printk(KERN_ERR "clock.c: Enable for %s without enable code\n", |
256 | clk->name); | 256 | clk->name); |
257 | return 0; /* REVISIT: -EINVAL */ | 257 | return 0; /* REVISIT: -EINVAL */ |
@@ -283,7 +283,7 @@ void _omap2_clk_disable(struct clk *clk) | |||
283 | return; | 283 | return; |
284 | } | 284 | } |
285 | 285 | ||
286 | if (clk->enable_reg == 0) { | 286 | if (clk->enable_reg == NULL) { |
287 | /* | 287 | /* |
288 | * 'Independent' here refers to a clock which is not | 288 | * 'Independent' here refers to a clock which is not |
289 | * controlled by its parent. | 289 | * controlled by its parent. |
@@ -477,7 +477,7 @@ long omap2_clksel_round_rate(struct clk *clk, unsigned long target_rate) | |||
477 | /* Given a clock and a rate apply a clock specific rounding function */ | 477 | /* Given a clock and a rate apply a clock specific rounding function */ |
478 | long omap2_clk_round_rate(struct clk *clk, unsigned long rate) | 478 | long omap2_clk_round_rate(struct clk *clk, unsigned long rate) |
479 | { | 479 | { |
480 | if (clk->round_rate != 0) | 480 | if (clk->round_rate != NULL) |
481 | return clk->round_rate(clk, rate); | 481 | return clk->round_rate(clk, rate); |
482 | 482 | ||
483 | if (clk->flags & RATE_FIXED) | 483 | if (clk->flags & RATE_FIXED) |
@@ -566,7 +566,7 @@ u32 omap2_divisor_to_clksel(struct clk *clk, u32 div) | |||
566 | */ | 566 | */ |
567 | void __iomem *omap2_get_clksel(struct clk *clk, u32 *field_mask) | 567 | void __iomem *omap2_get_clksel(struct clk *clk, u32 *field_mask) |
568 | { | 568 | { |
569 | if (unlikely((clk->clksel_reg == 0) || (clk->clksel_mask == 0))) | 569 | if (unlikely((clk->clksel_reg == NULL) || (clk->clksel_mask == NULL))) |
570 | return NULL; | 570 | return NULL; |
571 | 571 | ||
572 | *field_mask = clk->clksel_mask; | 572 | *field_mask = clk->clksel_mask; |
@@ -586,7 +586,7 @@ u32 omap2_clksel_get_divisor(struct clk *clk) | |||
586 | void __iomem *div_addr; | 586 | void __iomem *div_addr; |
587 | 587 | ||
588 | div_addr = omap2_get_clksel(clk, &field_mask); | 588 | div_addr = omap2_get_clksel(clk, &field_mask); |
589 | if (div_addr == 0) | 589 | if (div_addr == NULL) |
590 | return 0; | 590 | return 0; |
591 | 591 | ||
592 | field_val = __raw_readl(div_addr) & field_mask; | 592 | field_val = __raw_readl(div_addr) & field_mask; |
@@ -605,7 +605,7 @@ int omap2_clksel_set_rate(struct clk *clk, unsigned long rate) | |||
605 | return -EINVAL; | 605 | return -EINVAL; |
606 | 606 | ||
607 | div_addr = omap2_get_clksel(clk, &field_mask); | 607 | div_addr = omap2_get_clksel(clk, &field_mask); |
608 | if (div_addr == 0) | 608 | if (div_addr == NULL) |
609 | return -EINVAL; | 609 | return -EINVAL; |
610 | 610 | ||
611 | field_val = omap2_divisor_to_clksel(clk, new_div); | 611 | field_val = omap2_divisor_to_clksel(clk, new_div); |
@@ -643,7 +643,7 @@ int omap2_clk_set_rate(struct clk *clk, unsigned long rate) | |||
643 | return -EINVAL; | 643 | return -EINVAL; |
644 | 644 | ||
645 | /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */ | 645 | /* dpll_ck, core_ck, virt_prcm_set; plus all clksel clocks */ |
646 | if (clk->set_rate != 0) | 646 | if (clk->set_rate != NULL) |
647 | ret = clk->set_rate(clk, rate); | 647 | ret = clk->set_rate(clk, rate); |
648 | 648 | ||
649 | if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES))) | 649 | if (unlikely(ret == 0 && (clk->flags & RATE_PROPAGATES))) |
@@ -664,7 +664,7 @@ static u32 omap2_clksel_get_src_field(void __iomem **src_addr, | |||
664 | const struct clksel_rate *clkr; | 664 | const struct clksel_rate *clkr; |
665 | 665 | ||
666 | *parent_div = 0; | 666 | *parent_div = 0; |
667 | *src_addr = 0; | 667 | *src_addr = NULL; |
668 | 668 | ||
669 | clks = omap2_get_clksel_by_parent(clk, src_clk); | 669 | clks = omap2_get_clksel_by_parent(clk, src_clk); |
670 | if (clks == NULL) | 670 | if (clks == NULL) |
@@ -705,7 +705,7 @@ int omap2_clk_set_parent(struct clk *clk, struct clk *new_parent) | |||
705 | 705 | ||
706 | field_val = omap2_clksel_get_src_field(&src_addr, new_parent, | 706 | field_val = omap2_clksel_get_src_field(&src_addr, new_parent, |
707 | &field_mask, clk, &parent_div); | 707 | &field_mask, clk, &parent_div); |
708 | if (src_addr == 0) | 708 | if (src_addr == NULL) |
709 | return -EINVAL; | 709 | return -EINVAL; |
710 | 710 | ||
711 | if (clk->usecount > 0) | 711 | if (clk->usecount > 0) |