summaryrefslogtreecommitdiff
path: root/drivers/char/drm/drm_fops.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2006-02-02 19:37:46 +1100
committerDave Airlie <airlied@linux.ie>2006-02-02 19:37:46 +1100
commit30e2fb188194908e48d3f27a53ccea6740eb1e98 (patch)
treeeef1e9495aa6db6cddc67cf7f20369a3acdd2291 /drivers/char/drm/drm_fops.c
parentce60fe02fbe737cbce09e2ba5a2ef1efd20eff73 (diff)
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>
Diffstat (limited to 'drivers/char/drm/drm_fops.c')
-rw-r--r--drivers/char/drm/drm_fops.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c
index 403f44a1bf01..641f7633878c 100644
--- a/drivers/char/drm/drm_fops.c
+++ b/drivers/char/drm/drm_fops.c
@@ -262,7 +262,7 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
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 @@ static int drm_open_helper(struct inode *inode, struct file *filp,
dev->file_last->next = priv;
dev->file_last = priv;
}
- up(&dev->struct_sem);
+ mutex_unlock(&dev->struct_mutex);
#ifdef __alpha__
/*
@@ -413,7 +413,7 @@ int drm_release(struct inode *inode, struct file *filp)
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 @@ int drm_release(struct inode *inode, struct file *filp)
}
}
}
- 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 @@ int drm_release(struct inode *inode, struct file *filp)
} else {
dev->file_last = priv->prev;
}
- up(&dev->struct_sem);
+ mutex_unlock(&dev->struct_mutex);
if (dev->driver->postclose)
dev->driver->postclose(dev, priv);