Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 360362
b: refs/heads/master
c: 6d2559f
h: refs/heads/master
v: v3
  • Loading branch information
Huang Shijie authored and Artem Bityutskiy committed Feb 4, 2013
1 parent 155ffc1 commit 1694f63
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 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: 1648eaaa1575ea686acb82fb8cb3d8839764ef2c
refs/heads/master: 6d2559f8bc297597f8058ee75bdb8060edd5214d
8 changes: 2 additions & 6 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -825,13 +825,8 @@ static void panic_nand_wait(struct mtd_info *mtd, struct nand_chip *chip,
static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
{

unsigned long timeo = jiffies;
int status, state = chip->state;

if (state == FL_ERASING)
timeo += (HZ * 400) / 1000;
else
timeo += (HZ * 20) / 1000;
unsigned long timeo = (state == FL_ERASING ? 400 : 20);

led_trigger_event(nand_led_trigger, LED_FULL);

Expand All @@ -849,6 +844,7 @@ static int nand_wait(struct mtd_info *mtd, struct nand_chip *chip)
if (in_interrupt() || oops_in_progress)
panic_nand_wait(mtd, chip, timeo);
else {
timeo = jiffies + msecs_to_jiffies(timeo);
while (time_before(jiffies, timeo)) {
if (chip->dev_ready) {
if (chip->dev_ready(mtd))
Expand Down

0 comments on commit 1694f63

Please sign in to comment.