Commit 7b45fff0 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Greg Kroah-Hartman

serial/mpsc: switch to dma_alloc_attrs

Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e36361d7
...@@ -754,9 +754,10 @@ static int mpsc_alloc_ring_mem(struct mpsc_port_info *pi) ...@@ -754,9 +754,10 @@ static int mpsc_alloc_ring_mem(struct mpsc_port_info *pi)
if (!dma_set_mask(pi->port.dev, 0xffffffff)) { if (!dma_set_mask(pi->port.dev, 0xffffffff)) {
printk(KERN_ERR "MPSC: Inadequate DMA support\n"); printk(KERN_ERR "MPSC: Inadequate DMA support\n");
rc = -ENXIO; rc = -ENXIO;
} else if ((pi->dma_region = dma_alloc_noncoherent(pi->port.dev, } else if ((pi->dma_region = dma_alloc_attrs(pi->port.dev,
MPSC_DMA_ALLOC_SIZE, MPSC_DMA_ALLOC_SIZE,
&pi->dma_region_p, GFP_KERNEL)) &pi->dma_region_p, GFP_KERNEL,
DMA_ATTR_NON_CONSISTENT))
== NULL) { == NULL) {
printk(KERN_ERR "MPSC: Can't alloc Desc region\n"); printk(KERN_ERR "MPSC: Can't alloc Desc region\n");
rc = -ENOMEM; rc = -ENOMEM;
...@@ -771,8 +772,9 @@ static void mpsc_free_ring_mem(struct mpsc_port_info *pi) ...@@ -771,8 +772,9 @@ static void mpsc_free_ring_mem(struct mpsc_port_info *pi)
pr_debug("mpsc_free_ring_mem[%d]: Freeing ring mem\n", pi->port.line); pr_debug("mpsc_free_ring_mem[%d]: Freeing ring mem\n", pi->port.line);
if (pi->dma_region) { if (pi->dma_region) {
dma_free_noncoherent(pi->port.dev, MPSC_DMA_ALLOC_SIZE, dma_free_attrs(pi->port.dev, MPSC_DMA_ALLOC_SIZE,
pi->dma_region, pi->dma_region_p); pi->dma_region, pi->dma_region_p,
DMA_ATTR_NON_CONSISTENT);
pi->dma_region = NULL; pi->dma_region = NULL;
pi->dma_region_p = (dma_addr_t)NULL; pi->dma_region_p = (dma_addr_t)NULL;
} }
......
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