mirror of
https://github.com/DigitalDevices/dddvb.git
synced 2023-10-10 13:37:43 +02:00
pci_*_dma_mask no longer exists in 5.18
This commit is contained in:
parent
2a88d220e4
commit
871821d6a0
@ -283,11 +283,17 @@ static int __devinit ddb_probe(struct pci_dev *pdev,
|
|||||||
|
|
||||||
pci_set_master(pdev);
|
pci_set_master(pdev);
|
||||||
|
|
||||||
|
#if (KERNEL_VERSION(5, 18, 0) <= LINUX_VERSION_CODE)
|
||||||
|
if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64)))
|
||||||
|
if (dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)))
|
||||||
|
#else
|
||||||
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
|
if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
|
||||||
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
|
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
|
||||||
} else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
|
} else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
|
||||||
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
|
pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
|
||||||
} else return -ENODEV;
|
} else
|
||||||
|
#endif
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
dev = vzalloc(sizeof(*dev));
|
dev = vzalloc(sizeof(*dev));
|
||||||
if (!dev)
|
if (!dev)
|
||||||
|
Loading…
Reference in New Issue
Block a user