diff options
author | Christoph Hellwig <hch@lst.de> | 2018-12-12 08:41:27 +0100 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-01-09 03:58:35 +0100 |
commit | bb327df8326eff8b12bfcca39b8e1f25f616b1c3 (patch) | |
tree | 0d59730f044ae929e09bfc1b2410b4d9c7d65f47 /drivers/scsi/gdth_proc.c | |
parent | scsi: gdth: remove interrupt coalescing support (diff) | |
download | linux-bb327df8326eff8b12bfcca39b8e1f25f616b1c3.tar.xz linux-bb327df8326eff8b12bfcca39b8e1f25f616b1c3.zip |
scsi: gdth: use generic DMA API
Switch from the legacy PCI DMA API to the generic DMA API. Also switch
to dma_map_single from pci_map_page in one case where this makes the code
simpler.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to '')
-rw-r--r-- | drivers/scsi/gdth_proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/gdth_proc.c b/drivers/scsi/gdth_proc.c index 5a13ccac8dee..381d849726ac 100644 --- a/drivers/scsi/gdth_proc.c +++ b/drivers/scsi/gdth_proc.c @@ -236,7 +236,7 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) seq_puts(m, "\nPhysical Devices:"); flag = FALSE; - buf = pci_alloc_consistent(ha->pdev, size, &paddr); + buf = dma_alloc_coherent(&ha->pdev->dev, size, &paddr, GFP_KERNEL); if (!buf) goto stop_output; for (i = 0; i < ha->bus_cnt; ++i) { @@ -504,7 +504,7 @@ int gdth_show_info(struct seq_file *m, struct Scsi_Host *host) } } } - pci_free_consistent(ha->pdev, size, buf, paddr); + dma_free_coherent(&ha->pdev->dev, size, buf, paddr); for (i = 0; i < MAX_HDRIVES; ++i) { if (!(ha->hdr[i].present)) |