summaryrefslogtreecommitdiff
path: root/drivers/hwtracing/intel_th/acpi.c
diff options
context:
space:
mode:
authorAlexander Shishkin <alexander.shishkin@linux.intel.com>2019-05-03 11:44:39 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-05-03 18:14:29 +0200
commit62a593022c32380d040303a5e3d6b67fd9c415bc (patch)
tree0db3d3817feaa05653f5db434584b5ebe5fb19d6 /drivers/hwtracing/intel_th/acpi.c
parentfc027f4ce7c718660e046c3269b303bdbe692fda (diff)
intel_th: Communicate IRQ via resource
Currently, the IRQ is passed between the glue layers and the core as a separate argument, while the MMIO resources are passed as resources. This also limits the number of IRQs thus used to one, while the current versions of Intel TH use a different MSI vector for each interrupt triggering event, of which there are 7. Change this to pass IRQ in the resources array. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hwtracing/intel_th/acpi.c')
-rw-r--r--drivers/hwtracing/intel_th/acpi.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/hwtracing/intel_th/acpi.c b/drivers/hwtracing/intel_th/acpi.c
index b528e5b113ff..87f9024e4bbb 100644
--- a/drivers/hwtracing/intel_th/acpi.c
+++ b/drivers/hwtracing/intel_th/acpi.c
@@ -40,20 +40,18 @@ static int intel_th_acpi_probe(struct platform_device *pdev)
struct resource resource[TH_MMIO_END];
const struct acpi_device_id *id;
struct intel_th *th;
- int i, r, irq = -1;
+ int i, r;
id = acpi_match_device(intel_th_acpi_ids, &pdev->dev);
if (!id)
return -ENODEV;
for (i = 0, r = 0; i < pdev->num_resources && r < TH_MMIO_END; i++)
- if (pdev->resource[i].flags & IORESOURCE_IRQ)
- irq = pdev->resource[i].start;
- else if (pdev->resource[i].flags & IORESOURCE_MEM)
+ if (pdev->resource[i].flags &
+ (IORESOURCE_IRQ | IORESOURCE_MEM))
resource[r++] = pdev->resource[i];
- th = intel_th_alloc(&pdev->dev, (void *)id->driver_data, resource, r,
- irq);
+ th = intel_th_alloc(&pdev->dev, (void *)id->driver_data, resource, r);
if (IS_ERR(th))
return PTR_ERR(th);