Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 154737
b: refs/heads/master
c: c276aca
h: refs/heads/master
i:
  154735: e1d2cac
v: v3
  • Loading branch information
vimal singh authored and David Woodhouse committed Jun 28, 2009
1 parent 3e0fffc commit 1e5b814
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 70ec3bb8ea3f8c55b255f41d122c7d4d8c0d00b4
refs/heads/master: c276aca46d26aa2347320096f8ecdf5016795c14
7 changes: 5 additions & 2 deletions trunk/drivers/mtd/nand/omap2.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
#include <linux/delay.h>
#include <linux/jiffies.h>
#include <linux/sched.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
#include <linux/mtd/partitions.h>
Expand Down Expand Up @@ -541,7 +543,7 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip)
struct omap_nand_info *info = container_of(mtd, struct omap_nand_info,
mtd);
unsigned long timeo = jiffies;
int status, state = this->state;
int status = NAND_STATUS_FAIL, state = this->state;

if (state == FL_ERASING)
timeo += (HZ * 400) / 1000;
Expand All @@ -556,8 +558,9 @@ static int omap_wait(struct mtd_info *mtd, struct nand_chip *chip)

while (time_before(jiffies, timeo)) {
status = __raw_readb(this->IO_ADDR_R);
if (!(status & 0x40))
if (status & NAND_STATUS_READY)
break;
cond_resched();
}
return status;
}
Expand Down

0 comments on commit 1e5b814

Please sign in to comment.