]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
dmaengine: hsu: pci: switch to new API for IRQ allocation
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 26 Oct 2016 15:18:21 +0000 (18:18 +0300)
committerVinod Koul <vinod.koul@intel.com>
Fri, 25 Nov 2016 05:41:08 +0000 (11:11 +0530)
There is new API in place which provides allocation mechanism of interrupts for
PCI devices. Use it in the HSU DMA driver.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/hsu/pci.c

index b51639f045edaf2fbdfb618eef375abe37186e36..4875fa428e813e07d36c82a86a41c4a3e9d5c82e 100644 (file)
@@ -77,13 +77,15 @@ static int hsu_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        if (!chip)
                return -ENOMEM;
 
+       ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
+       if (ret < 0)
+               return ret;
+
        chip->dev = &pdev->dev;
        chip->regs = pcim_iomap_table(pdev)[0];
        chip->length = pci_resource_len(pdev, 0);
        chip->offset = HSU_PCI_CHAN_OFFSET;
-       chip->irq = pdev->irq;
-
-       pci_enable_msi(pdev);
+       chip->irq = pci_irq_vector(pdev, 0);
 
        ret = hsu_dma_probe(chip);
        if (ret)