mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.115,1.116
David Woodhouse
dwmw2 at infradead.org
Mon Apr 28 11:16:24 EDT 2003
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv32583
Modified Files:
cfi_cmdset_0001.c
Log Message:
Common get_chip() function.
Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.115
retrieving revision 1.116
diff -u -r1.115 -r1.116
--- cfi_cmdset_0001.c 28 Apr 2003 10:55:12 -0000 1.115
+++ cfi_cmdset_0001.c 28 Apr 2003 15:16:21 -0000 1.116
@@ -32,7 +32,8 @@
#include <linux/mtd/cfi.h>
#include <linux/mtd/compatmac.h>
-// debugging, turns off buffer write mode #define FORCE_WORD_WRITE
+// debugging, turns off buffer write mode if set to 1
+#define FORCE_WORD_WRITE 0
static int cfi_intelext_read (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
static int cfi_intelext_read_user_prot_reg (struct mtd_info *, loff_t, size_t, size_t *, u_char *);
@@ -52,11 +53,16 @@
[...1070 lines suppressed...]
- * as the whole point is that nobody can do anything
- * with the chip now anyway.
- */
- case FL_PM_SUSPENDED:
- break;
-
+ if (chip->oldstate == FL_READY) {
+ chip->oldstate = chip->state;
+ chip->state = FL_PM_SUSPENDED;
+ /* No need to wake_up() on this state change -
+ * as the whole point is that nobody can do anything
+ * with the chip now anyway.
+ */
+ }
default:
ret = -EAGAIN;
+ case FL_PM_SUSPENDED:
break;
}
spin_unlock(chip->mutex);
More information about the linux-mtd-cvs
mailing list