From 3a21986f1a5974d3d4d1489840188e2349ec7911 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 11 Oct 2018 10:02:55 +0200 Subject: scsi: aic94xx: fully convert to the generic DMA API The driver is currently using an odd mix of legacy PCI DMA API and generic DMA API calls, switch it over to the generic API entirely. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- drivers/scsi/aic94xx/aic94xx_init.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'drivers/scsi/aic94xx/aic94xx_init.c') diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index 1391e5f35918..41c4d8abdd4a 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -771,13 +771,8 @@ static int asd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) goto Err_remove; err = -ENODEV; - if (!pci_set_dma_mask(dev, DMA_BIT_MASK(64)) - && !pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(64))) - ; - else if (!pci_set_dma_mask(dev, DMA_BIT_MASK(32)) - && !pci_set_consistent_dma_mask(dev, DMA_BIT_MASK(32))) - ; - else { + if (dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(64)) || + dma_set_mask_and_coherent(&dev->dev, DMA_BIT_MASK(32))) { asd_printk("no suitable DMA mask for %s\n", pci_name(dev)); goto Err_remove; } -- cgit v1.2.3-70-g09d2