aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r--drivers/pcmcia/cs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index c68c5d338285..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
@@ -226,7 +220,7 @@ int pcmcia_register_socket(struct pcmcia_socket *socket)
226 /* set proper values in socket->dev */ 220 /* set proper values in socket->dev */
227 dev_set_drvdata(&socket->dev, socket); 221 dev_set_drvdata(&socket->dev, socket);
228 socket->dev.class = &pcmcia_socket_class; 222 socket->dev.class = &pcmcia_socket_class;
229 snprintf(socket->dev.bus_id, BUS_ID_SIZE, "pcmcia_socket%u", socket->sock); 223 dev_set_name(&socket->dev, "pcmcia_socket%u", socket->sock);
230 224
231 /* base address = 0, map = 0 */ 225 /* base address = 0, map = 0 */
232 socket->cis_mem.flags = 0; 226 socket->cis_mem.flags = 0;
@@ -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);