pcmcia: simplify locking
[firefly-linux-kernel-4.4.55.git] / drivers / pcmcia / rsrc_mgr.c
index cdd30c180066b257cd866a4c6b3163edbccb888e..b81586622d028102628d2147686244a0f3c8fc00 100644 (file)
 
 static int static_init(struct pcmcia_socket *s)
 {
-       unsigned long flags;
-
        /* the good thing about SS_CAP_STATIC_MAP sockets is
         * that they don't need a resource database */
 
-       spin_lock_irqsave(&s->lock, flags);
+       mutex_lock(&s->ops_mutex);
        s->resource_setup_done = 1;
-       spin_unlock_irqrestore(&s->lock, flags);
+       mutex_unlock(&s->ops_mutex);
 
        return 0;
 }