diff mbox

nand: Remove meaningless delay from nand_unlock

Message ID 1306936600-28870-1-git-send-email-jiri.pinkava@vscht.cz
State Accepted
Commit d3f2ed520b51f06d4f3c8c96bd4ba6e7e57643a3
Headers show

Commit Message

Jiri Pinkava June 1, 2011, 1:56 p.m. UTC
From: Jiri Pinkava <jiri.pinkava@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@vscht.cz>
---
 drivers/mtd/nand/nand_base.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Comments

Brian Norris June 2, 2011, 4:23 p.m. UTC | #1
On Wed, Jun 1, 2011 at 6:56 AM,  <jiri.pinkava@vscht.cz> wrote:
> From: Jiri Pinkava <jiri.pinkava@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).

Looks ok to me, but I don't have hardware to test this with.

CC'ing Vimal who added this code originally.

Brian
Brian Norris June 2, 2011, 4:26 p.m. UTC | #2
On Thu, Jun 2, 2011 at 9:23 AM, Brian Norris
<computersforpeace@gmail.com> wrote:
> CC'ing Vimal who added this code originally.

Apparently I had the wrong address for Vimal...I think he has used
this one more recently.

Brian
vimal singh June 2, 2011, 6:24 p.m. UTC | #3
On Thu, Jun 2, 2011 at 9:53 PM, Brian Norris
<computersforpeace@gmail.com> wrote:
> On Wed, Jun 1, 2011 at 6:56 AM,  <jiri.pinkava@vscht.cz> wrote:
>> From: Jiri Pinkava <jiri.pinkava@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.
Indeed, these delays are not required. I guess it was left out code
before posting the patch.
Here is my ack:

Acked-by: Vimal Singh <vimal.newwork@gmail.com>
Artem Bityutskiy June 3, 2011, 3:32 p.m. UTC | #4
On Wed, 2011-06-01 at 15:56 +0200, jiri.pinkava@vscht.cz wrote:
> From: Jiri Pinkava <jiri.pinkava@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@vscht.cz>

Pushed to l2-mtd-2.6.git, thanks.
diff mbox

Patch

diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index a46e9bb..290a1db 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -919,7 +919,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",
@@ -1028,7 +1027,6 @@  int nand_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len)
 
 	/* 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",