To support multiple PMUs we'll need to pass the arm_pmu instance around.
Update of_pmu_irq_cfg to take an arm_pmu, and acquire the platform
device from this.
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
return ret;
}
-static int of_pmu_irq_cfg(struct platform_device *pdev)
+static int of_pmu_irq_cfg(struct arm_pmu *pmu)
{
int i;
+ struct platform_device *pdev = pmu->plat_device;
int *irqs = kcalloc(pdev->num_resources, sizeof(*irqs), GFP_KERNEL);
if (!irqs)
}
if (i == pdev->num_resources)
- cpu_pmu->irq_affinity = irqs;
+ pmu->irq_affinity = irqs;
else
kfree(irqs);
if (node && (of_id = of_match_node(cpu_pmu_of_device_ids, pdev->dev.of_node))) {
init_fn = of_id->data;
- ret = of_pmu_irq_cfg(pdev);
+ ret = of_pmu_irq_cfg(pmu);
if (!ret)
ret = init_fn(pmu);
} else {