summaryrefslogtreecommitdiffstats
path: root/sound/aoa
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-06-15 13:37:55 -0700
committerTakashi Iwai <tiwai@suse.de>2014-06-16 11:39:45 +0200
commit7f0f20486f4d3da7abaf0099738708881196aa2f (patch)
tree5f89373086e652a603cefda67d06aeafc346dcf8 /sound/aoa
parent74b0c2d75fb4cc89173944e6d8f9eb47aca0c343 (diff)
downloadop-kernel-dev-7f0f20486f4d3da7abaf0099738708881196aa2f.zip
op-kernel-dev-7f0f20486f4d3da7abaf0099738708881196aa2f.tar.gz
ALSA: Use dma_zalloc_coherent
Use the zeroing function instead of dma_alloc_coherent & memset(,0,) Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/aoa')
-rw-r--r--sound/aoa/soundbus/i2sbus/core.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c
index 4678360..a80d5ea 100644
--- a/sound/aoa/soundbus/i2sbus/core.c
+++ b/sound/aoa/soundbus/i2sbus/core.c
@@ -47,15 +47,11 @@ static int alloc_dbdma_descriptor_ring(struct i2sbus_dev *i2sdev,
/* We use the PCI APIs for now until the generic one gets fixed
* enough or until we get some macio-specific versions
*/
- r->space = dma_alloc_coherent(
- &macio_get_pci_dev(i2sdev->macio)->dev,
- r->size,
- &r->bus_addr,
- GFP_KERNEL);
+ r->space = dma_zalloc_coherent(&macio_get_pci_dev(i2sdev->macio)->dev,
+ r->size, &r->bus_addr, GFP_KERNEL);
+ if (!r->space)
+ return -ENOMEM;
- if (!r->space) return -ENOMEM;
-
- memset(r->space, 0, r->size);
r->cmds = (void*)DBDMA_ALIGN(r->space);
r->bus_cmd_start = r->bus_addr +
(dma_addr_t)((char*)r->cmds - (char*)r->space);
OpenPOWER on IntegriCloud