]> git.ipfire.org Git - people/ms/linux.git/blobdiff - include/linux/mtd/flashchip.h
mtd: fix a huge latency problem in the MTD CFI and LPDDR flash drivers.
[people/ms/linux.git] / include / linux / mtd / flashchip.h
index d0bf422ae374a19ae41d81e41db3c1b60447d293..f43e9b49b751bd479e033e154cc0440689f9ff52 100644 (file)
@@ -15,6 +15,7 @@
  * has asm/spinlock.h, or 2.4, which has linux/spinlock.h
  */
 #include <linux/sched.h>
+#include <linux/mutex.h>
 
 typedef enum {
        FL_READY,
@@ -74,8 +75,7 @@ struct flchip {
        unsigned int erase_suspended:1;
        unsigned long in_progress_block_addr;
 
-       spinlock_t *mutex;
-       spinlock_t _spinlock; /* We do it like this because sometimes they'll be shared. */
+       struct mutex mutex;
        wait_queue_head_t wq; /* Wait on here when we're waiting for the chip
                             to be ready */
        int word_write_time;