Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176963
b: refs/heads/master
c: 6b0d9a8
h: refs/heads/master
i:
  176961: 39d9df5
  176959: 804ae30
v: v3
  • Loading branch information
Li Yang authored and David Woodhouse committed Nov 30, 2009
1 parent 577d2c2 commit 754c178
Show file tree
Hide file tree
Showing 2 changed files with 9 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: 4a58948669702639db7acecfa2105c3172d85c93
refs/heads/master: 6b0d9a84124937f048bcb8b21313152b23063978
10 changes: 8 additions & 2 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -740,8 +740,14 @@ nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, int new_state)
return 0;
}
if (new_state == FL_PM_SUSPENDED) {
spin_unlock(lock);
return (chip->state == FL_PM_SUSPENDED) ? 0 : -EAGAIN;
if (chip->controller->active->state == FL_PM_SUSPENDED) {
chip->state = FL_PM_SUSPENDED;
spin_unlock(lock);
return 0;
} else {
spin_unlock(lock);
return -EAGAIN;
}
}
set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(wq, &wait);
Expand Down

0 comments on commit 754c178

Please sign in to comment.