aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r--drivers/pcmcia/cs.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 5d0e60e09d31..0660ad182589 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -186,12 +186,6 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
186 186
187 spin_lock_init(&socket->lock); 187 spin_lock_init(&socket->lock);
188 188
189 if (socket->resource_ops->init) {
190 ret = socket->resource_ops->init(socket);
191 if (ret)
192 return (ret);
193 }
194
195 /* try to obtain a socket number [yes, it gets ugly if we 189 /* try to obtain a socket number [yes, it gets ugly if we
196 * register more than 2^sizeof(unsigned int) pcmcia 190 * register more than 2^sizeof(unsigned int) pcmcia
197 * sockets... but the socket number is deprecated 191 * sockets... but the socket number is deprecated
@@ -239,6 +233,12 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
239 mutex_init(&socket->skt_mutex); 233 mutex_init(&socket->skt_mutex);
240 spin_lock_init(&socket->thread_lock); 234 spin_lock_init(&socket->thread_lock);
241 235
236 if (socket->resource_ops->init) {
237 ret = socket->resource_ops->init(socket);
238 if (ret)
239 goto err;
240 }
241
242 tsk = kthread_run(pccardd, socket, "pccardd"); 242 tsk = kthread_run(pccardd, socket, "pccardd");
243 if (IS_ERR(tsk)) { 243 if (IS_ERR(tsk)) {
244 ret = PTR_ERR(tsk); 244 ret = PTR_ERR(tsk);