[PATCH] nand: Remove meaningless delay from nand_unlock

Artem Bityutskiy dedekind1 at gmail.com
Tue Apr 12 23:28:29 EDT 2011


On Sun, 2011-04-10 at 04:30 +0200, jiri.pinkava at vscht.cz wrote:
> From: Jiří Pinkava <jiri.pinkava at vscht.cz>
> 
> This delay is meaningless. If delay is needed it is device specific
> and must be reimplemented by specific driver, otherwise no delay is needed.
> 
> This function is not used by any current kernel code, affects only
> external code (like main).
> 
> Signed-off-by: Jiri Pinkava <jiri.pinkava at vscht.cz>
> ---
>  drivers/mtd/nand/nand_base.c |    1 -
>  1 files changed, 0 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
> index 2aef58e..5b5aff5 100644
> --- a/drivers/mtd/nand/nand_base.c
> +++ b/drivers/mtd/nand/nand_base.c
> @@ -922,7 +922,6 @@ static int __nand_unlock(struct mtd_info *mtd, loff_t ofs,
>  
>  	/* Call wait ready function */
>  	status = chip->waitfunc(mtd, chip);
> -	udelay(1000);
>  	/* See if device thinks it succeeded */
>  	if (status & 0x01) {
>  		DEBUG(MTD_DEBUG_LEVEL0, "%s: Error status = 0x%08x\n",

Hi, it looks sane to remove this udelay. However,

1. If you do this, then you also have to do it in __nand_lock() - there
is a similar udelay()
2. Let's CC Vimal who is the author of this code - may be he'll tell us
why he added the delays.

-- 
Best Regards,
Artem Bityutskiy (Битюцкий Артём)




More information about the linux-mtd mailing list