sem2mutex: drivers/char/drm/

From: Arjan van de Ven <arjan@infradead.org>

Semaphore to mutex conversion.

The conversion was generated via scripts, and the result was validated
automatically via a script as well.

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index 403f44a..641f763 100644
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -262,7 +262,7 @@
 			goto out_free;
 	}
 
-	down(&dev->struct_sem);
+	mutex_lock(&dev->struct_mutex);
 	if (!dev->file_last) {
 		priv->next = NULL;
 		priv->prev = NULL;
@@ -276,7 +276,7 @@
 		dev->file_last->next = priv;
 		dev->file_last = priv;
 	}
-	up(&dev->struct_sem);
+	mutex_unlock(&dev->struct_mutex);
 
 #ifdef __alpha__
 	/*
@@ -413,7 +413,7 @@
 
 	drm_fasync(-1, filp, 0);
 
-	down(&dev->ctxlist_sem);
+	mutex_lock(&dev->ctxlist_mutex);
 	if (dev->ctxlist && (!list_empty(&dev->ctxlist->head))) {
 		drm_ctx_list_t *pos, *n;
 
@@ -432,9 +432,9 @@
 			}
 		}
 	}
-	up(&dev->ctxlist_sem);
+	mutex_unlock(&dev->ctxlist_mutex);
 
-	down(&dev->struct_sem);
+	mutex_lock(&dev->struct_mutex);
 	if (priv->remove_auth_on_close == 1) {
 		drm_file_t *temp = dev->file_first;
 		while (temp) {
@@ -452,7 +452,7 @@
 	} else {
 		dev->file_last = priv->prev;
 	}
-	up(&dev->struct_sem);
+	mutex_unlock(&dev->struct_mutex);
 
 	if (dev->driver->postclose)
 		dev->driver->postclose(dev, priv);