mtd/drivers/mtd/chips cfi_cmdset_0001.c,1.185,1.186
Nicolas Pitre
nico at infradead.org
Wed Nov 23 17:07:56 EST 2005
Update of /home/cvs/mtd/drivers/mtd/chips
In directory phoenix.infradead.org:/tmp/cvs-serv15619/drivers/mtd/chips
Modified Files:
cfi_cmdset_0001.c
Log Message:
[MTD] cfi_cmdset_0001: relax locking rules for multi hardware partition support
Signed-off-by: Nicolas Pitre <nico at cam.org>
Index: cfi_cmdset_0001.c
===================================================================
RCS file: /home/cvs/mtd/drivers/mtd/chips/cfi_cmdset_0001.c,v
retrieving revision 1.185
retrieving revision 1.186
diff -u -r1.185 -r1.186
--- cfi_cmdset_0001.c 7 Nov 2005 11:14:22 -0000 1.185
+++ cfi_cmdset_0001.c 23 Nov 2005 22:07:52 -0000 1.186
@@ -645,9 +645,8 @@
*
* - contension arbitration is handled in the owner's context.
*
- * The 'shared' struct can be read when its lock is taken.
- * However any writes to it can only be made when the current
- * owner's lock is also held.
+ * The 'shared' struct can be read and/or written only when
+ * its lock is taken.
*/
struct flchip_shared *shared = chip->priv;
struct flchip *contender;
@@ -676,14 +675,13 @@
}
timeo = jiffies + HZ;
spin_lock(&shared->lock);
+ spin_unlock(contender->mutex);
}
/* We now own it */
shared->writing = chip;
if (mode == FL_ERASING)
shared->erasing = chip;
- if (contender && contender != chip)
- spin_unlock(contender->mutex);
spin_unlock(&shared->lock);
}
More information about the linux-mtd-cvs
mailing list