From cb457a4ddd4eeac9c81792a1e6a5d59b1b44abe1 Mon Sep 17 00:00:00 2001 From: Hong Xu Date: Wed, 30 Mar 2011 16:26:41 +0800 Subject: mtd: atmel_nand: fix support for CPUs that do not support DMA access use_dma was always "1" even if the CPU does not support DMA Tested on AT91SAM9261EK by Jean-Christophe PLAGNIOL-VILLARD Reported-by: Jean-Christophe PLAGNIOL-VILLARD Signed-off-by: Hong Xu Signed-off-by: Artem Bityutskiy --- drivers/mtd/nand/atmel_nand.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/mtd') diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 7e88a801669c..f254fa636afc 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c @@ -599,7 +599,10 @@ static int __init atmel_nand_probe(struct platform_device *pdev) nand_chip->options |= NAND_USE_FLASH_BBT; } - if (cpu_has_dma() && use_dma) { + if (!cpu_has_dma()) + use_dma = 0; + + if (use_dma) { dma_cap_mask_t mask; dma_cap_zero(mask); -- cgit v1.2.2