summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hptiop.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-10-18 15:10:18 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2018-11-15 20:27:08 +0100
commit453cd3700ca37f759cf975999abb7b5b4347fd85 (patch)
tree82c575cf58ffc18b7c7e79f0262e238c0aedf3ea /drivers/scsi/hptiop.c
parentscsi: hisi_sas: use dma_set_mask_and_coherent (diff)
downloadlinux-453cd3700ca37f759cf975999abb7b5b4347fd85.tar.xz
linux-453cd3700ca37f759cf975999abb7b5b4347fd85.zip
scsi: hptiop: use dma_set_mask
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>
Diffstat (limited to 'drivers/scsi/hptiop.c')
-rw-r--r--drivers/scsi/hptiop.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/scsi/hptiop.c b/drivers/scsi/hptiop.c
index 2fad7f03aa02..dc52b37a0df8 100644
--- a/drivers/scsi/hptiop.c
+++ b/drivers/scsi/hptiop.c
@@ -1309,11 +1309,11 @@ static int hptiop_probe(struct pci_dev *pcidev, const struct pci_device_id *id)
/* Enable 64bit DMA if possible */
iop_ops = (struct hptiop_adapter_ops *)id->driver_data;
- if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(iop_ops->hw_dma_bit_mask))) {
- if (pci_set_dma_mask(pcidev, DMA_BIT_MASK(32))) {
- printk(KERN_ERR "hptiop: fail to set dma_mask\n");
- goto disable_pci_device;
- }
+ if (dma_set_mask(&pcidev->dev,
+ DMA_BIT_MASK(iop_ops->hw_dma_bit_mask)) ||
+ dma_set_mask(&pcidev->dev, DMA_BIT_MASK(32))) {
+ printk(KERN_ERR "hptiop: fail to set dma_mask\n");
+ goto disable_pci_device;
}
if (pci_request_regions(pcidev, driver_name)) {