aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/sh_tmu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clocksource/sh_tmu.c')
-rw-r--r--drivers/clocksource/sh_tmu.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
index 17296288a20..80813576861 100644
--- a/drivers/clocksource/sh_tmu.c
+++ b/drivers/clocksource/sh_tmu.c
@@ -25,7 +25,6 @@
25#include <linux/delay.h> 25#include <linux/delay.h>
26#include <linux/io.h> 26#include <linux/io.h>
27#include <linux/clk.h> 27#include <linux/clk.h>
28#include <linux/pm_runtime.h>
29#include <linux/irq.h> 28#include <linux/irq.h>
30#include <linux/err.h> 29#include <linux/err.h>
31#include <linux/clocksource.h> 30#include <linux/clocksource.h>
@@ -110,12 +109,10 @@ static int sh_tmu_enable(struct sh_tmu_priv *p)
110{ 109{
111 int ret; 110 int ret;
112 111
113 /* wake up device and enable clock */ 112 /* enable clock */
114 pm_runtime_get_sync(&p->pdev->dev);
115 ret = clk_enable(p->clk); 113 ret = clk_enable(p->clk);
116 if (ret) { 114 if (ret) {
117 dev_err(&p->pdev->dev, "cannot enable clock\n"); 115 dev_err(&p->pdev->dev, "cannot enable clock\n");
118 pm_runtime_put_sync(&p->pdev->dev);
119 return ret; 116 return ret;
120 } 117 }
121 118
@@ -144,9 +141,8 @@ static void sh_tmu_disable(struct sh_tmu_priv *p)
144 /* disable interrupts in TMU block */ 141 /* disable interrupts in TMU block */
145 sh_tmu_write(p, TCR, 0x0000); 142 sh_tmu_write(p, TCR, 0x0000);
146 143
147 /* stop clock and mark device as idle */ 144 /* stop clock */
148 clk_disable(p->clk); 145 clk_disable(p->clk);
149 pm_runtime_put_sync(&p->pdev->dev);
150} 146}
151 147
152static void sh_tmu_set_next(struct sh_tmu_priv *p, unsigned long delta, 148static void sh_tmu_set_next(struct sh_tmu_priv *p, unsigned long delta,
@@ -415,7 +411,6 @@ static int __devinit sh_tmu_probe(struct platform_device *pdev)
415 411
416 if (p) { 412 if (p) {
417 dev_info(&pdev->dev, "kept as earlytimer\n"); 413 dev_info(&pdev->dev, "kept as earlytimer\n");
418 pm_runtime_enable(&pdev->dev);
419 return 0; 414 return 0;
420 } 415 }
421 416
@@ -430,9 +425,6 @@ static int __devinit sh_tmu_probe(struct platform_device *pdev)
430 kfree(p); 425 kfree(p);
431 platform_set_drvdata(pdev, NULL); 426 platform_set_drvdata(pdev, NULL);
432 } 427 }
433
434 if (!is_early_platform_device(pdev))
435 pm_runtime_enable(&pdev->dev);
436 return ret; 428 return ret;
437} 429}
438 430