media: zoran: convert irq to pci irq
authorCorentin Labbe <clabbe@baylibre.com>
Fri, 25 Sep 2020 18:30:36 +0000 (20:30 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 1 Oct 2020 07:43:06 +0000 (09:43 +0200)
This patch convert zoran to pci_irq functions.

Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/zoran/zoran_card.c

index 8be7f8f0a02020fca10bba406f21845507e18aec..706b040f5baab8f45c9ff46aea0f6380bb8e0a5b 100644 (file)
@@ -1015,7 +1015,7 @@ static void zoran_remove(struct pci_dev *pdev)
        zoran_set_pci_master(zr, 0);
        /* put chip into reset */
        btwrite(0, ZR36057_SPGPPCR);
-       free_irq(zr->pci_dev->irq, zr);
+       pci_free_irq(zr->pci_dev, 0, zr);
        /* unmap and free memory */
        dma_free_coherent(&zr->pci_dev->dev, BUZ_NUM_STAT_COM * sizeof(u32), zr->stat_com, zr->p_sc);
        iounmap(zr->zr36057_mem);
@@ -1175,8 +1175,7 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
                goto zr_unreg;
        }
 
-       result = request_irq(zr->pci_dev->irq, zoran_irq,
-                            IRQF_SHARED, ZR_DEVNAME(zr), zr);
+       result = pci_request_irq(pdev, 0, zoran_irq, NULL, zr, ZR_DEVNAME(zr));
        if (result < 0) {
                if (result == -EINVAL) {
                        pci_err(pdev, "%s - bad IRQ number or handler\n", __func__);
@@ -1292,7 +1291,7 @@ zr_unreg_i2c:
        zoran_unregister_i2c(zr);
 zr_free_irq:
        btwrite(0, ZR36057_SPGPPCR);
-       free_irq(zr->pci_dev->irq, zr);
+       pci_free_irq(zr->pci_dev, 0, zr);
 zr_unmap:
        iounmap(zr->zr36057_mem);
 zr_unreg: