mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 00:20:32 +00:00
dmaengine: hsu: pci: switch to new API for IRQ allocation
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>
This commit is contained in:
parent
85f57752b3
commit
e9bb8a9df3
1 changed files with 5 additions and 3 deletions
|
@ -77,13 +77,15 @@ static int hsu_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
||||||
if (!chip)
|
if (!chip)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
ret = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_ALL_TYPES);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
chip->dev = &pdev->dev;
|
chip->dev = &pdev->dev;
|
||||||
chip->regs = pcim_iomap_table(pdev)[0];
|
chip->regs = pcim_iomap_table(pdev)[0];
|
||||||
chip->length = pci_resource_len(pdev, 0);
|
chip->length = pci_resource_len(pdev, 0);
|
||||||
chip->offset = HSU_PCI_CHAN_OFFSET;
|
chip->offset = HSU_PCI_CHAN_OFFSET;
|
||||||
chip->irq = pdev->irq;
|
chip->irq = pci_irq_vector(pdev, 0);
|
||||||
|
|
||||||
pci_enable_msi(pdev);
|
|
||||||
|
|
||||||
ret = hsu_dma_probe(chip);
|
ret = hsu_dma_probe(chip);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
|
Loading…
Reference in a new issue