diff options
| author | Christoph Hellwig <hch@lst.de> | 2020-09-25 06:19:19 +0200 |
|---|---|---|
| committer | Christoph Hellwig <hch@lst.de> | 2020-09-25 06:19:19 +0200 |
| commit | 8c1c6c7588b2faf9dd45fb3cfb7497fd09bbfe7c (patch) | |
| tree | 50a7ddcfd7e7b1a7e4fb656bb88a036dbcff4bd6 /arch/arc/kernel/perf_event.c | |
| parent | 38225f2ef2f4263fc65acae63fdd4e8489c9ffcf (diff) | |
| parent | 171d4ff79f965c1f164705ef0aaea102a6ad238b (diff) | |
| download | linux-8c1c6c7588b2faf9dd45fb3cfb7497fd09bbfe7c.tar.gz linux-8c1c6c7588b2faf9dd45fb3cfb7497fd09bbfe7c.tar.bz2 linux-8c1c6c7588b2faf9dd45fb3cfb7497fd09bbfe7c.zip | |
Merge branch 'master' of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into dma-mapping-for-next
Pull in the latest 5.9 tree for the commit to revert the
V4L2_FLAG_MEMORY_NON_CONSISTENT uapi addition.
Diffstat (limited to 'arch/arc/kernel/perf_event.c')
| -rw-r--r-- | arch/arc/kernel/perf_event.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/arch/arc/kernel/perf_event.c b/arch/arc/kernel/perf_event.c index 661fd842ea97..79849f37e782 100644 --- a/arch/arc/kernel/perf_event.c +++ b/arch/arc/kernel/perf_event.c @@ -562,7 +562,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev) { struct arc_reg_pct_build pct_bcr; struct arc_reg_cc_build cc_bcr; - int i, has_interrupts; + int i, has_interrupts, irq; int counter_size; /* in bits */ union cc_name { @@ -637,13 +637,7 @@ static int arc_pmu_device_probe(struct platform_device *pdev) .attr_groups = arc_pmu->attr_groups, }; - if (has_interrupts) { - int irq = platform_get_irq(pdev, 0); - - if (irq < 0) { - pr_err("Cannot get IRQ number for the platform\n"); - return -ENODEV; - } + if (has_interrupts && (irq = platform_get_irq(pdev, 0) >= 0)) { arc_pmu->irq = irq; @@ -652,9 +646,9 @@ static int arc_pmu_device_probe(struct platform_device *pdev) this_cpu_ptr(&arc_pmu_cpu)); on_each_cpu(arc_cpu_pmu_irq_init, &irq, 1); - - } else + } else { arc_pmu->pmu.capabilities |= PERF_PMU_CAP_NO_INTERRUPT; + } /* * perf parser doesn't really like '-' symbol in events name, so let's |
