mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-03 14:42:18 -04:00
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: Suraj Upadhyay <usuraj35@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
ed99640d55
commit
02900a49a4
@@ -1708,8 +1708,8 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
|
||||
|
||||
pci_set_master(pdev);
|
||||
|
||||
err = pci_enable_msi(pdev);
|
||||
if (err) {
|
||||
err = pci_alloc_irq_vectors(pdev, 1, 1, PCI_IRQ_MSI);
|
||||
if (err < 0) {
|
||||
dev_err(&pdev->dev, "Failed to enable msi (%d)\n", err);
|
||||
goto enable_msi_fail;
|
||||
}
|
||||
@@ -1827,7 +1827,7 @@ static int atomisp_pci_probe(struct pci_dev *pdev, const struct pci_device_id *i
|
||||
initialize_modules_fail:
|
||||
cpu_latency_qos_remove_request(&isp->pm_qos);
|
||||
atomisp_msi_irq_uninit(isp);
|
||||
pci_disable_msi(pdev);
|
||||
pci_free_irq_vectors(pdev);
|
||||
enable_msi_fail:
|
||||
fw_validation_fail:
|
||||
release_firmware(isp->firmware);
|
||||
|
||||
Reference in New Issue
Block a user