The generic DMA API uses dev->dma_mask to check the DMA addressable
memory bitmask, and warns if no mask is set or even allocated.

Allocate z->dev.dma_mask on Zorro bus scan so device drivers can use
dma_set_mask_and_coherent() to set their DMA bit mask.

Signed-off-by: Michael Schmitz <schmitz...@gmail.com>
---
 drivers/zorro/zorro.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/zorro/zorro.c b/drivers/zorro/zorro.c
index cc1b1ac..e2d0344 100644
--- a/drivers/zorro/zorro.c
+++ b/drivers/zorro/zorro.c
@@ -185,6 +185,8 @@ static int __init amiga_zorro_probe(struct platform_device 
*pdev)
                z->dev.parent = &bus->dev;
                z->dev.bus = &zorro_bus_type;
                z->dev.id = i;
+               z->dev.dma_mask =
+                       kmalloc(sizeof(*z->dev.dma_mask), GFP_KERNEL);
        }
 
        /* ... then register them */
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to