diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-16 09:14:11 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-02-17 17:48:20 +0100 |
commit | 00ce99ff506a17882747a7d6874e3f5206a99043 (patch) | |
tree | 571f5b106f25f35f326d456123c4af85147c3bce /include/pcmcia | |
parent | 3d3de32fad19e37695e6649136e4cb17f9d46329 (diff) |
pcmcia: simplify locking
replace pcmcia_socket->lock and pcmcia_dev_list_lock by using the
per-socket "ops_mutex", as we do neither need different locks
nor a spinlock here.
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'include/pcmcia')
-rw-r--r-- | include/pcmcia/ss.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index e756069859b5..cfaccc224b50 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h @@ -134,7 +134,6 @@ struct pccard_operations { struct pcmcia_socket { struct module *owner; - spinlock_t lock; socket_state_t socket; u_int state; u_int suspended_state; /* state before suspend */ @@ -201,10 +200,12 @@ struct pcmcia_socket { struct task_struct *thread; struct completion thread_done; unsigned int thread_events; - /* protects socket h/w state */ + + /* For the non-trivial interaction between these locks, + * see Documentation/pcmcia/locking.txt */ struct mutex skt_mutex; - /* protects PCMCIA state */ struct mutex ops_mutex; + /* protects thread_events */ spinlock_t thread_lock; |