|
@@ -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);
|