[PATCH] mtd: nand: docg4: add udelay(1) to polling loop
Artem Bityutskiy
dedekind1 at gmail.com
Thu May 16 03:43:56 EDT 2013
On Mon, 2013-04-22 at 11:23 -0700, Mike Dunn wrote:
> timeo = 1000;
> do {
> + udelay(1);
> cpu_relax();
> flash_status = readb(docptr + DOC_FLASHCONTROL);
> } while (!(flash_status & DOC_CTRL_FLASHREADY) && --timeo);
How about using jiffies instead? Something like:
timeout = jiffies + msecs_to_jiffies(delay);
do {
} while (time_before(jiffies, timeout))
--
Best Regards,
Artem Bityutskiy
More information about the linux-mtd
mailing list