pcmcia: add locking to set_mem_map()
Protect the pccard_operations callback "set_mem_map" by a new
mutex ops_mutex. This mutex also protects the following values
in struct pcmcia_socket:
pccard_mem_map win[]
pccard_mem_map cis_mem
void __iomem *cis_virt
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h
index 9ab53d8..e756069 100644
--- a/include/pcmcia/ss.h
+++ b/include/pcmcia/ss.h
@@ -203,6 +203,8 @@
unsigned int thread_events;
/* protects socket h/w state */
struct mutex skt_mutex;
+ /* protects PCMCIA state */
+ struct mutex ops_mutex;
/* protects thread_events */
spinlock_t thread_lock;