diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/oprofile/common.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/arm/oprofile/common.c b/arch/arm/oprofile/common.c index 5b1d752edbc3..02e5d6f45166 100644 --- a/arch/arm/oprofile/common.c +++ b/arch/arm/oprofile/common.c | |||
@@ -78,15 +78,19 @@ static void pmu_stop(void) | |||
78 | #ifdef CONFIG_PM | 78 | #ifdef CONFIG_PM |
79 | static int pmu_suspend(struct sys_device *dev, pm_message_t state) | 79 | static int pmu_suspend(struct sys_device *dev, pm_message_t state) |
80 | { | 80 | { |
81 | down(&pmu_sem); | ||
81 | if (pmu_enabled) | 82 | if (pmu_enabled) |
82 | pmu_stop(); | 83 | pmu_model->stop(); |
84 | up(&pmu_sem); | ||
83 | return 0; | 85 | return 0; |
84 | } | 86 | } |
85 | 87 | ||
86 | static int pmu_resume(struct sys_device *dev) | 88 | static int pmu_resume(struct sys_device *dev) |
87 | { | 89 | { |
88 | if (pmu_enabled) | 90 | down(&pmu_sem); |
89 | pmu_start(); | 91 | if (pmu_enabled && pmu_model->start()) |
92 | pmu_enabled = 0; | ||
93 | up(&pmu_sem); | ||
90 | return 0; | 94 | return 0; |
91 | } | 95 | } |
92 | 96 | ||