mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-15 05:56:41 +07:00
media: zoran: use pci_request_regions
Use pci_request_regions so now we can see zoran in /proc/iomem. 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>
This commit is contained in:
parent
4bae5db2f2
commit
845556fd80
@ -1011,6 +1011,7 @@ static void zoran_remove(struct pci_dev *pdev)
|
||||
/* 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);
|
||||
pci_release_regions(pdev);
|
||||
pci_disable_device(zr->pci_dev);
|
||||
video_unregister_device(zr->video_dev);
|
||||
exit_free:
|
||||
@ -1160,10 +1161,14 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
snprintf(ZR_DEVNAME(zr), sizeof(ZR_DEVNAME(zr)), "%s[%u]",
|
||||
zr->card.name, zr->id);
|
||||
|
||||
err = pci_request_regions(pdev, ZR_DEVNAME(zr));
|
||||
if (err)
|
||||
goto zr_unreg;
|
||||
|
||||
zr->zr36057_mem = pci_ioremap_bar(zr->pci_dev, 0);
|
||||
if (!zr->zr36057_mem) {
|
||||
pci_err(pdev, "%s() - ioremap failed\n", __func__);
|
||||
goto zr_unreg;
|
||||
goto zr_pci_release;
|
||||
}
|
||||
|
||||
result = pci_request_irq(pdev, 0, zoran_irq, NULL, zr, ZR_DEVNAME(zr));
|
||||
@ -1281,6 +1286,8 @@ static int zoran_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||
pci_free_irq(zr->pci_dev, 0, zr);
|
||||
zr_unmap:
|
||||
iounmap(zr->zr36057_mem);
|
||||
zr_pci_release:
|
||||
pci_release_regions(pdev);
|
||||
zr_unreg:
|
||||
v4l2_ctrl_handler_free(&zr->hdl);
|
||||
v4l2_device_unregister(&zr->v4l2_dev);
|
||||
|
Loading…
Reference in New Issue
Block a user