scsi: arcmsr: use dma_set_mask
authorChristoph Hellwig <hch@lst.de>
Thu, 18 Oct 2018 13:10:13 +0000 (15:10 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 15 Nov 2018 19:26:28 +0000 (14:26 -0500)
The driver currently uses pci_set_dma_mask despite otherwise using the
generic DMA API.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/arcmsr/arcmsr_hba.c

index d4404eea24fb0451be2adca54489a8412804bea4..11e8e6df50b183bfa452e14f3d29166f25d0e3da 100644 (file)
@@ -903,9 +903,9 @@ static int arcmsr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        if(!host){
                goto pci_disable_dev;
        }
-       error = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
+       error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
        if(error){
-               error = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
+               error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
                if(error){
                        printk(KERN_WARNING
                               "scsi%d: No suitable DMA mask available\n",
@@ -1049,9 +1049,9 @@ static int arcmsr_resume(struct pci_dev *pdev)
                pr_warn("%s: pci_enable_device error\n", __func__);
                return -ENODEV;
        }
-       error = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
+       error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
        if (error) {
-               error = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
+               error = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
                if (error) {
                        pr_warn("scsi%d: No suitable DMA mask available\n",
                               host->host_no);