lkml.org 
[lkml]   [2020]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH v2] staging: media: atomisp: Replace depracated MSI APIs
Replace depracated 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.

Signed-off-by: Suraj Upadhyay <usuraj35@gmail.com>
---
Change:
v2: Replace the MSI IRQ disabler too.
---
drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
index d36809a0182c..a5dea5521b36 100644
--- a/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
+++ b/drivers/staging/media/atomisp/pci/atomisp_v4l2.c
@@ -1735,8 +1735,8 @@ static int atomisp_pci_probe(struct pci_dev *dev,
pci_set_master(dev);
pci_set_drvdata(dev, isp);

- err = pci_enable_msi(dev);
- if (err) {
+ err = pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSI);
+ if (err < 0) {
dev_err(&dev->dev, "Failed to enable msi (%d)\n", err);
goto enable_msi_fail;
}
@@ -1857,7 +1857,7 @@ static int atomisp_pci_probe(struct pci_dev *dev,
initialize_modules_fail:
cpu_latency_qos_remove_request(&isp->pm_qos);
atomisp_msi_irq_uninit(isp, dev);
- pci_disable_msi(dev);
+ pci_free_irq_vectors(dev);
enable_msi_fail:
fw_validation_fail:
release_firmware(isp->firmware);
--
2.17.1
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2020-07-19 16:27    [W:0.140 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site