]> git.baikalelectronics.ru Git - kernel.git/commit
mtd: docg3 add protection against concurrency
authorRobert Jarzmik <robert.jarzmik@free.fr>
Thu, 22 Mar 2012 20:00:53 +0000 (21:00 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Tue, 27 Mar 2012 00:03:27 +0000 (01:03 +0100)
commit9cf2fd0f0d9a70b53510fc4193b36e33c0038bf4
tree48cb065f253ed6552e8e5805bba7647eb25a8ad7
parent62ecc7e01ba433a1160ec54f8dfaef3301907107
mtd: docg3 add protection against concurrency

As docg3 is intolerant against reentrancy, especially
because of its weird register access (ie. a register read is
performed by a first register write), each access to the
docg3 IO space must be locked.

Lock the IO space with a mutex, shared by all chips on the
same cascade, as they all share the same IO space.

Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/devices/docg3.c
drivers/mtd/devices/docg3.h