Commit 02900a49 authored by Suraj Upadhyay's avatar Suraj Upadhyay Committed by Mauro Carvalho Chehab

media: atomisp: Replace deprecated MSI APIs

Replace deprecated MSI IRQ enabler and disabler
with pci_alloc_irq_vectors and pci_free_irq_vectors respectively.
And as a result handle the returned error as appropriate.
Compile tested.

[mchehab: solved a merge conflict that renamed dev->pdev]
Signed-off-by: default avatarSuraj Upadhyay <usuraj35@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent ed99640d
...@@ -1708,8 +1708,8 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i ...@@ -1708,8 +1708,8 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
pci_set_master(pdev); pci_set_master(pdev);
err = pci_enable_msi(pdev); err = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
if (err) { if (err < 0) {
dev_err(&pdev->dev, "Failed to enable msi (%d)\n", err); dev_err(&pdev->dev, "Failed to enable msi (%d)\n", err);
goto enable_msi_fail; goto enable_msi_fail;
} }
...@@ -1827,7 +1827,7 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i ...@@ -1827,7 +1827,7 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
initialize_modules_fail: initialize_modules_fail:
cpu_latency_qos_remove_request(&isp->pm_qos); cpu_latency_qos_remove_request(&isp->pm_qos);
atomisp_msi_irq_uninit(isp); atomisp_msi_irq_uninit(isp);
pci_disable_msi(pdev); pci_free_irq_vectors(pdev);
enable_msi_fail: enable_msi_fail:
fw_validation_fail: fw_validation_fail:
release_firmware(isp->firmware); release_firmware(isp->firmware);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment