diff options
author | Mark Rutland <mark.rutland@arm.com> | 2015-05-26 17:23:34 +0100 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2015-05-28 16:54:02 +0100 |
commit | ed61f9851d0686d56d7a9648b4807d82ad0adce6 (patch) | |
tree | 1a2528290bf56864d624d2fb41968b4a28684185 /arch/arm/kernel | |
parent | 7a2a24cb433e0932828d77e98d5c86606cb09c2a (diff) | |
download | linux-ed61f9851d0686d56d7a9648b4807d82ad0adce6.tar.gz linux-ed61f9851d0686d56d7a9648b4807d82ad0adce6.tar.bz2 linux-ed61f9851d0686d56d7a9648b4807d82ad0adce6.zip |
arm: perf: kill off unused pm callbacks
Currently the arm perf code has platdata callbacks for runtime PM and
irq handling, but no platform implements the hooks for the former. Kill
these off.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm/kernel')
-rw-r--r-- | arch/arm/kernel/perf_event.c | 38 | ||||
-rw-r--r-- | arch/arm/kernel/perf_event_cpu.c | 1 |
2 files changed, 1 insertions, 38 deletions
diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c index df028072aabf..0072e8bb78f4 100644 --- a/arch/arm/kernel/perf_event.c +++ b/arch/arm/kernel/perf_event.c @@ -14,7 +14,6 @@ #include <linux/cpumask.h> #include <linux/kernel.h> #include <linux/platform_device.h> -#include <linux/pm_runtime.h> #include <linux/irq.h> #include <linux/irqdesc.h> @@ -349,20 +348,12 @@ static void armpmu_release_hardware(struct arm_pmu *armpmu) { armpmu->free_irq(armpmu); - pm_runtime_put_sync(&armpmu->plat_device->dev); } static int armpmu_reserve_hardware(struct arm_pmu *armpmu) { - int err; - struct platform_device *pmu_device = armpmu->plat_device; - - if (!pmu_device) - return -ENODEV; - - pm_runtime_get_sync(&pmu_device->dev); - err = armpmu->request_irq(armpmu, armpmu_dispatch_irq); + int err = armpmu->request_irq(armpmu, armpmu_dispatch_irq); if (err) { armpmu_release_hardware(armpmu); return err; @@ -536,32 +527,6 @@ static int armpmu_filter_match(struct perf_event *event) return cpumask_test_cpu(cpu, &armpmu->supported_cpus); } -#ifdef CONFIG_PM -static int armpmu_runtime_resume(struct device *dev) -{ - struct arm_pmu_platdata *plat = dev_get_platdata(dev); - - if (plat && plat->runtime_resume) - return plat->runtime_resume(dev); - - return 0; -} - -static int armpmu_runtime_suspend(struct device *dev) -{ - struct arm_pmu_platdata *plat = dev_get_platdata(dev); - - if (plat && plat->runtime_suspend) - return plat->runtime_suspend(dev); - - return 0; -} -#endif - -const struct dev_pm_ops armpmu_dev_pm_ops = { - SET_RUNTIME_PM_OPS(armpmu_runtime_suspend, armpmu_runtime_resume, NULL) -}; - static void armpmu_init(struct arm_pmu *armpmu) { atomic_set(&armpmu->active_events, 0); @@ -583,7 +548,6 @@ static void armpmu_init(struct arm_pmu *armpmu) int armpmu_register(struct arm_pmu *armpmu, int type) { armpmu_init(armpmu); - pm_runtime_enable(&armpmu->plat_device->dev); pr_info("enabled with %s PMU driver, %d counters available\n", armpmu->name, armpmu->num_events); return perf_pmu_register(&armpmu->pmu, armpmu->name, type); diff --git a/arch/arm/kernel/perf_event_cpu.c b/arch/arm/kernel/perf_event_cpu.c index 50f245bf4e05..14a5a0a5ec1d 100644 --- a/arch/arm/kernel/perf_event_cpu.c +++ b/arch/arm/kernel/perf_event_cpu.c @@ -408,7 +408,6 @@ out_free: static struct platform_driver cpu_pmu_driver = { .driver = { .name = "arm-pmu", - .pm = &armpmu_dev_pm_ops, .of_match_table = cpu_pmu_of_device_ids, }, .probe = cpu_pmu_device_probe, |