mtd: OneNAND: do not use DMA if oops in progress

Otherwise we may hang if we are called from panic() through mtdoops.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
Aaro Koskinen 2010-02-10 19:03:19 +02:00 committed by David Woodhouse
parent 7d70f334ad
commit 932f5d21cc
1 changed files with 2 additions and 2 deletions

View File

@ -308,7 +308,7 @@ static int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area,
goto out_copy;
/* panic_write() may be in an interrupt context */
if (in_interrupt())
if (in_interrupt() || oops_in_progress)
goto out_copy;
if (buf >= high_memory) {
@ -385,7 +385,7 @@ static int omap3_onenand_write_bufferram(struct mtd_info *mtd, int area,
goto out_copy;
/* panic_write() may be in an interrupt context */
if (in_interrupt())
if (in_interrupt() || oops_in_progress)
goto out_copy;
if (buf >= high_memory) {