diff options
Diffstat (limited to 'drivers/clocksource/sh_cmt.c')
-rw-r--r-- | drivers/clocksource/sh_cmt.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 036e5865eb40..dc7c033ef587 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c | |||
@@ -24,7 +24,6 @@ | |||
24 | #include <linux/ioport.h> | 24 | #include <linux/ioport.h> |
25 | #include <linux/io.h> | 25 | #include <linux/io.h> |
26 | #include <linux/clk.h> | 26 | #include <linux/clk.h> |
27 | #include <linux/pm_runtime.h> | ||
28 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
29 | #include <linux/err.h> | 28 | #include <linux/err.h> |
30 | #include <linux/clocksource.h> | 29 | #include <linux/clocksource.h> |
@@ -153,12 +152,10 @@ static int sh_cmt_enable(struct sh_cmt_priv *p, unsigned long *rate) | |||
153 | { | 152 | { |
154 | int ret; | 153 | int ret; |
155 | 154 | ||
156 | /* wake up device and enable clock */ | 155 | /* enable clock */ |
157 | pm_runtime_get_sync(&p->pdev->dev); | ||
158 | ret = clk_enable(p->clk); | 156 | ret = clk_enable(p->clk); |
159 | if (ret) { | 157 | if (ret) { |
160 | dev_err(&p->pdev->dev, "cannot enable clock\n"); | 158 | dev_err(&p->pdev->dev, "cannot enable clock\n"); |
161 | pm_runtime_put_sync(&p->pdev->dev); | ||
162 | return ret; | 159 | return ret; |
163 | } | 160 | } |
164 | 161 | ||
@@ -190,9 +187,8 @@ static void sh_cmt_disable(struct sh_cmt_priv *p) | |||
190 | /* disable interrupts in CMT block */ | 187 | /* disable interrupts in CMT block */ |
191 | sh_cmt_write(p, CMCSR, 0); | 188 | sh_cmt_write(p, CMCSR, 0); |
192 | 189 | ||
193 | /* stop clock and mark device as idle */ | 190 | /* stop clock */ |
194 | clk_disable(p->clk); | 191 | clk_disable(p->clk); |
195 | pm_runtime_put_sync(&p->pdev->dev); | ||
196 | } | 192 | } |
197 | 193 | ||
198 | /* private flags */ | 194 | /* private flags */ |
@@ -664,7 +660,6 @@ static int __devinit sh_cmt_probe(struct platform_device *pdev) | |||
664 | 660 | ||
665 | if (p) { | 661 | if (p) { |
666 | dev_info(&pdev->dev, "kept as earlytimer\n"); | 662 | dev_info(&pdev->dev, "kept as earlytimer\n"); |
667 | pm_runtime_enable(&pdev->dev); | ||
668 | return 0; | 663 | return 0; |
669 | } | 664 | } |
670 | 665 | ||
@@ -679,9 +674,6 @@ static int __devinit sh_cmt_probe(struct platform_device *pdev) | |||
679 | kfree(p); | 674 | kfree(p); |
680 | platform_set_drvdata(pdev, NULL); | 675 | platform_set_drvdata(pdev, NULL); |
681 | } | 676 | } |
682 | |||
683 | if (!is_early_platform_device(pdev)) | ||
684 | pm_runtime_enable(&pdev->dev); | ||
685 | return ret; | 677 | return ret; |
686 | } | 678 | } |
687 | 679 | ||