mtd/r852: update card detect early.
authorMaxim Levitsky <maximlevitsky@gmail.com>
Wed, 2 Jun 2010 13:01:47 +0000 (16:01 +0300)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 2 Jun 2010 14:35:31 +0000 (15:35 +0100)
This turns out to be the reason for DMA timeouts on resume,
if card was inserted while system was suspended

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/nand/r852.c

index 3f219e61df7d3f6d121bb85746e0f28bf08bca9c..bcfc851fe55069bc93ffb38b28f8985a4b87f704 100644 (file)
@@ -712,6 +712,7 @@ void r852_card_detect_work(struct work_struct *work)
                container_of(work, struct r852_device, card_detect_work.work);
 
        r852_card_update_present(dev);
+       r852_update_card_detect(dev);
        dev->card_unstable = 0;
 
        /* False alarm */
@@ -727,7 +728,6 @@ void r852_card_detect_work(struct work_struct *work)
        else
                r852_unregister_nand_device(dev);
 exit:
-       /* Update detection logic */
        r852_update_card_detect(dev);
 }