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 <[email protected]>
Signed-off-by: Dominik Brodowski <[email protected]>
This commit is contained in:
Dominik Brodowski 2010-01-12 21:42:51 +01:00
commit 6b8e087b86
5 changed files with 32 additions and 5 deletions

View file

@ -203,6 +203,8 @@ struct pcmcia_socket {
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;