aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-03-01 04:32:48 -0500
committerThomas Gleixner <tglx@mtd.linutronix.de>2005-05-23 06:47:55 -0400
commit20a6c211903dce92a0db7f19c221cfa3f2cb4c32 (patch)
treef50c0611c9c4129d61625e352352f317ab089ed1 /drivers
parent31fbdf7aa5aac8a2a34f180a25deb157297a10c9 (diff)
[MTD] NAND: Use cond_resched instead of msleep
Replace msleep by cond_resched. On machines with HZ=100 (e.g. ARM) msleep slows down the operation by factor 10 Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/nand/nand_base.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 4d7c916c74fc..4c94ec632aed 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -59,7 +59,7 @@
59 * The AG-AND chips have nice features for speed improvement, 59 * The AG-AND chips have nice features for speed improvement,
60 * which are not supported yet. Read / program 4 pages in one go. 60 * which are not supported yet. Read / program 4 pages in one go.
61 * 61 *
62 * $Id: nand_base.c,v 1.134 2005/02/22 21:56:46 gleixner Exp $ 62 * $Id: nand_base.c,v 1.135 2005/03/01 09:32:45 gleixner Exp $
63 * 63 *
64 * This program is free software; you can redistribute it and/or modify 64 * This program is free software; you can redistribute it and/or modify
65 * it under the terms of the GNU General Public License version 2 as 65 * it under the terms of the GNU General Public License version 2 as
@@ -830,7 +830,7 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *this, int state)
830 if (this->read_byte(mtd) & NAND_STATUS_READY) 830 if (this->read_byte(mtd) & NAND_STATUS_READY)
831 break; 831 break;
832 } 832 }
833 msleep(1); 833 cond_resched();
834 } 834 }
835 status = (int) this->read_byte(mtd); 835 status = (int) this->read_byte(mtd);
836 return status; 836 return status;