diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c index 9dce31d2b525..4ac645a56c14 100644 --- a/drivers/media/pci/dm1105/dm1105.c +++ b/drivers/media/pci/dm1105/dm1105.c @@ -604,19 +604,17 @@ static void dm1105_set_dma_addr(struct dm1105_dev *dev) static int dm1105_dma_map(struct dm1105_dev *dev) { - dev->ts_buf = pci_alloc_consistent(dev->pdev, - 6 * DM1105_DMA_BYTES, - &dev->dma_addr); + dev->ts_buf = dma_alloc_coherent(&dev->pdev->dev, + 6 * DM1105_DMA_BYTES, &dev->dma_addr, + GFP_KERNEL); return !dev->ts_buf; } static void dm1105_dma_unmap(struct dm1105_dev *dev) { - pci_free_consistent(dev->pdev, - 6 * DM1105_DMA_BYTES, - dev->ts_buf, - dev->dma_addr); + dma_free_coherent(&dev->pdev->dev, 6 * DM1105_DMA_BYTES, dev->ts_buf, + dev->dma_addr); } static void dm1105_enable_irqs(struct dm1105_dev *dev) @@ -1010,7 +1008,7 @@ static int dm1105_probe(struct pci_dev *pdev, if (ret < 0) goto err_kfree; - ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); + ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); if (ret < 0) goto err_pci_disable_device;