aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/nand_base.c
diff options
context:
space:
mode:
authorMaxim Levitsky <maximlevitsky@gmail.com>2010-02-22 13:39:34 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2010-02-26 12:43:21 -0500
commit49ef3c6ee11e221b26caf4ac55c2702a37cca103 (patch)
tree958cc2cd058f1ad1919ddc1f7f2ef0fd14995158 /drivers/mtd/nand/nand_base.c
parent026ec57886b67c092bf7baecd029a7c1c4998c28 (diff)
mtd: nand: make suspend work if device is accessed by kernel threads.
Since all userspace threads are frozen at the time the nand_suspend is called, they aren't inside any nand function. We don't call try_to_freeze in nand ether. Thus the only user that can be inside the nand functions is an non freezeable kernel thread. Thus we can safely wait for it to finish. Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/nand_base.c')
-rw-r--r--drivers/mtd/nand/nand_base.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index ed62e1ee0f8..7442b3a29b2 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -773,9 +773,6 @@ nand_get_device(struct nand_chip *chip, struct mtd_info *mtd, int new_state)
773 chip->state = FL_PM_SUSPENDED; 773 chip->state = FL_PM_SUSPENDED;
774 spin_unlock(lock); 774 spin_unlock(lock);
775 return 0; 775 return 0;
776 } else {
777 spin_unlock(lock);
778 return -EAGAIN;
779 } 776 }
780 } 777 }
781 set_current_state(TASK_UNINTERRUPTIBLE); 778 set_current_state(TASK_UNINTERRUPTIBLE);