pcmcia: remove pcmcia_add_device_lock

As all cards to pcmcia_device_add() are already locked by skt_mutex, and
the critical sections inside this function are further protected by
ops_mutex, there's no need to keep a third lock around. Therfore, remove
pcmcia_add_device_lock.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 0e12d85..7ef7ade 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -477,15 +477,6 @@
 }
 
 
-/* device_add_lock is needed to avoid double registration by cardmgr and kernel.
- * Serializes pcmcia_device_add; will most likely be removed in future.
- *
- * While it has the caveat that adding new PCMCIA devices inside(!) device_register()
- * won't work, this doesn't matter much at the moment: the driver core doesn't
- * support it either.
- */
-static DEFINE_MUTEX(device_add_lock);
-
 struct pcmcia_device *pcmcia_device_add(struct pcmcia_socket *s, unsigned int function)
 {
 	struct pcmcia_device *p_dev, *tmp_dev;
@@ -495,8 +486,6 @@
 	if (!s)
 		return NULL;
 
-	mutex_lock(&device_add_lock);
-
 	pr_debug("adding device to %d, function %d\n", s->sock, function);
 
 	p_dev = kzalloc(sizeof(struct pcmcia_device), GFP_KERNEL);
@@ -536,8 +525,8 @@
 
 	/*
 	 * p_dev->function_config must be the same for all card functions.
-	 * Note that this is serialized by the device_add_lock, so that
-	 * only one such struct will be created.
+	 * Note that this is serialized by ops_mutex, so that only one
+	 * such struct will be created.
 	 */
 	list_for_each_entry(tmp_dev, &s->devices_list, socket_device_list)
 		if (p_dev->func == tmp_dev->func) {
@@ -575,8 +564,6 @@
 	if (device_register(&p_dev->dev))
 		goto err_unreg;
 
-	mutex_unlock(&device_add_lock);
-
 	return p_dev;
 
  err_unreg:
@@ -594,7 +581,6 @@
 	kfree(p_dev->devname);
 	kfree(p_dev);
  err_put:
-	mutex_unlock(&device_add_lock);
 	pcmcia_put_socket(s);
 
 	return NULL;