From f893180b79f6ada44068e4fe764eb2de70ee6bea Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Sat, 5 Dec 2015 16:18:44 -0800 Subject: ahci: compile out msi/msix infrastructure Quoting Arnd: The AHCI driver is used for some on-chip devices that do not use PCI for probing, and it can be built even when CONFIG_PCI is disabled, but that now results in a build failure: ata/libahci.c: In function 'ahci_host_activate_multi_irqs': ata/libahci.c:2475:4: error: invalid use of undefined type 'struct msix_entry' ata/libahci.c:2475:21: error: dereferencing pointer to incomplete type 'struct msix_entry' Add ifdef CONFIG_PCI_MSI infrastructure to compile out the multi-msi and multi-msix code. Reported-by: Arnd Bergmann Tested--by: Arnd Bergmann [arnd: fix up pci enabled case] Reported-by: Paul Gortmaker Fixes: d684a90d38e2 ("ahci: per-port msix support") Signed-off-by: Dan Williams Signed-off-by: Tejun Heo --- drivers/ata/libahci.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'drivers/ata/libahci.c') diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index 1b6c7cc415bf..eda3cf2163bb 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -2469,12 +2469,7 @@ static int ahci_host_activate_multi_irqs(struct ata_host *host, */ for (i = 0; i < host->n_ports; i++) { struct ahci_port_priv *pp = host->ports[i]->private_data; - int irq; - - if (hpriv->flags & AHCI_HFLAG_MULTI_MSIX) - irq = hpriv->msix[i].vector; - else - irq = hpriv->irq + i; + int irq = ahci_irq_vector(hpriv, i); /* Do not receive interrupts sent by dummy ports */ if (!pp) { -- cgit