Commit d31b7791 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Martin K. Petersen

scsi: sgiwd93: switch to dma_alloc_attrs

Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent
wrapper.

[mkp: fixed driver name]
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 106e97b9
...@@ -249,8 +249,8 @@ static int sgiwd93_probe(struct platform_device *pdev) ...@@ -249,8 +249,8 @@ static int sgiwd93_probe(struct platform_device *pdev)
hdata = host_to_hostdata(host); hdata = host_to_hostdata(host);
hdata->dev = &pdev->dev; hdata->dev = &pdev->dev;
hdata->cpu = dma_alloc_noncoherent(&pdev->dev, HPC_DMA_SIZE, hdata->cpu = dma_alloc_attrs(&pdev->dev, HPC_DMA_SIZE, &hdata->dma,
&hdata->dma, GFP_KERNEL); GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
if (!hdata->cpu) { if (!hdata->cpu) {
printk(KERN_WARNING "sgiwd93: Could not allocate memory for " printk(KERN_WARNING "sgiwd93: Could not allocate memory for "
"host %d buffer.\n", unit); "host %d buffer.\n", unit);
...@@ -289,7 +289,8 @@ static int sgiwd93_probe(struct platform_device *pdev) ...@@ -289,7 +289,8 @@ static int sgiwd93_probe(struct platform_device *pdev)
out_irq: out_irq:
free_irq(irq, host); free_irq(irq, host);
out_free: out_free:
dma_free_noncoherent(&pdev->dev, HPC_DMA_SIZE, hdata->cpu, hdata->dma); dma_free_attrs(&pdev->dev, HPC_DMA_SIZE, hdata->cpu, hdata->dma,
DMA_ATTR_NON_CONSISTENT);
out_put: out_put:
scsi_host_put(host); scsi_host_put(host);
out: out:
...@@ -305,7 +306,8 @@ static int sgiwd93_remove(struct platform_device *pdev) ...@@ -305,7 +306,8 @@ static int sgiwd93_remove(struct platform_device *pdev)
scsi_remove_host(host); scsi_remove_host(host);
free_irq(pd->irq, host); free_irq(pd->irq, host);
dma_free_noncoherent(&pdev->dev, HPC_DMA_SIZE, hdata->cpu, hdata->dma); dma_free_attrs(&pdev->dev, HPC_DMA_SIZE, hdata->cpu, hdata->dma,
DMA_ATTR_NON_CONSISTENT);
scsi_host_put(host); scsi_host_put(host);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment