aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs_internal.h
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-01-02 17:19:45 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2010-01-24 13:57:47 -0500
commit3970dd8c5169505f0cc5e4c3e2fde7bdd9bbad3e (patch)
tree86113b333d7de9d5e6f65b2dc077e44c6656c90b /drivers/pcmcia/cs_internal.h
parent593f010bc0d8f7fde2ce948cac3f77f6a3d9db2b (diff)
pcmcia: do not lock socket driver module on card insert
Do not lock the socket driver module on card insert, as the PCMCIA core can handle a socket module removal, at least if we add a call to socket_remove() on pccardd()'s shutdown. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/cs_internal.h')
-rw-r--r--drivers/pcmcia/cs_internal.h20
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
index 3bc02d53a3a3..9a3bbad7761b 100644
--- a/drivers/pcmcia/cs_internal.h
+++ b/drivers/pcmcia/cs_internal.h
@@ -87,26 +87,6 @@ struct pccard_resource_ops {
87#define SOCKET_CARDBUS 0x8000 87#define SOCKET_CARDBUS 0x8000
88#define SOCKET_CARDBUS_CONFIG 0x10000 88#define SOCKET_CARDBUS_CONFIG 0x10000
89 89
90static inline int cs_socket_get(struct pcmcia_socket *skt)
91{
92 int ret;
93
94 WARN_ON(skt->state & SOCKET_INUSE);
95
96 ret = try_module_get(skt->owner);
97 if (ret)
98 skt->state |= SOCKET_INUSE;
99 return ret;
100}
101
102static inline void cs_socket_put(struct pcmcia_socket *skt)
103{
104 if (skt->state & SOCKET_INUSE) {
105 skt->state &= ~SOCKET_INUSE;
106 module_put(skt->owner);
107 }
108}
109
110 90
111/* 91/*
112 * Stuff internal to module "pcmcia_core": 92 * Stuff internal to module "pcmcia_core":