Skip to contentSkip to conversation

staging: media: atomisp: Replace depracated MSI API.

PATCH Superseded Suraj Upadhyay 1 participant 2 messages Jul 18, 2020 – Jul 19, 2020

Subsystems (5)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: media: atomisp: Replace depracated MSI API.

Replace depracated pci_enable_msi with pci_alloc_irq_vectors. And as a result modify how the returned value is handled.

---
 drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_v4l2.c +2 -2
index d36809a0182c..b824c6f78a9c 100644
@@ -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;
 	}
Signature · 1 line
2.17.1
#1 lore raw
Quoted 8 lines · Suraj Upadhyay

Replace depracated pci_enable_msi with pci_alloc_irq_vectors. And as a result modify how the returned value is handled.

---
 drivers/staging/media/atomisp/pci/atomisp_v4l2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Hii,
Please don't merge this patch. It is still incomplete.
It doesn't replace pci_disable_msi. I hope this wasn't an annoyance.

Thanks,

Suraj Upadhyay.

Quoted 18 lines
drivers/staging/media/atomisp/pci/atomisp_v4l2.c +2 -2
index d36809a0182c..b824c6f78a9c 100644
@@ -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;
 	}
Signature · 1 line
2.17.1