aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/sa1111.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-09-22 06:41:07 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-09-27 04:25:53 -0400
commit72ae00c970cf1e6027c5b719f42e7eff0aa1c1d9 (patch)
treebb3314bee1991c2909c50a61e7bb0f76e4b8bd88 /arch/arm/common/sa1111.c
parent52ca0f3ab568497adeac217e4167b51d9b4d4884 (diff)
clk: sa1111: convert to clk_prepare()/clk_unprepare()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common/sa1111.c')
-rw-r--r--arch/arm/common/sa1111.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 0569de6acfba..61691cdbdcf2 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -718,6 +718,10 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
718 goto err_free; 718 goto err_free;
719 } 719 }
720 720
721 ret = clk_prepare(sachip->clk);
722 if (ret)
723 goto err_clkput;
724
721 spin_lock_init(&sachip->lock); 725 spin_lock_init(&sachip->lock);
722 726
723 sachip->dev = me; 727 sachip->dev = me;
@@ -733,7 +737,7 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
733 sachip->base = ioremap(mem->start, PAGE_SIZE * 2); 737 sachip->base = ioremap(mem->start, PAGE_SIZE * 2);
734 if (!sachip->base) { 738 if (!sachip->base) {
735 ret = -ENOMEM; 739 ret = -ENOMEM;
736 goto err_clkput; 740 goto err_clk_unprep;
737 } 741 }
738 742
739 /* 743 /*
@@ -809,6 +813,8 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq)
809 813
810 err_unmap: 814 err_unmap:
811 iounmap(sachip->base); 815 iounmap(sachip->base);
816 err_clk_unprep:
817 clk_unprepare(sachip->clk);
812 err_clkput: 818 err_clkput:
813 clk_put(sachip->clk); 819 clk_put(sachip->clk);
814 err_free: 820 err_free:
@@ -835,6 +841,7 @@ static void __sa1111_remove(struct sa1111 *sachip)
835 sa1111_writel(0, irqbase + SA1111_WAKEEN1); 841 sa1111_writel(0, irqbase + SA1111_WAKEEN1);
836 842
837 clk_disable(sachip->clk); 843 clk_disable(sachip->clk);
844 clk_unprepare(sachip->clk);
838 845
839 if (sachip->irq != NO_IRQ) { 846 if (sachip->irq != NO_IRQ) {
840 irq_set_chained_handler(sachip->irq, NULL); 847 irq_set_chained_handler(sachip->irq, NULL);