summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-05-29 21:24:36 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-05-30 21:04:54 -0400
commit244ca2b4d0b5e500681e52ad9e6d7f3f2b9362a1 (patch)
treebe33e7733271215a9b8c37d0916d5501ed5363f5
parentfd657170c039a918c0b46f51db8005317d4c83fa (diff)
downloadtalos-obmc-linux-244ca2b4d0b5e500681e52ad9e6d7f3f2b9362a1.tar.gz
talos-obmc-linux-244ca2b4d0b5e500681e52ad9e6d7f3f2b9362a1.zip
i810: switch to vm_mmap()
Weirdness around do_mmap() in there does not rely on ->mmap_sem for exclusion, so no need to keep it under that. As the result, we can turn that do_mmap() into vm_mmap(). Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--drivers/gpu/drm/i810/i810_dma.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i810/i810_dma.c b/drivers/gpu/drm/i810/i810_dma.c
index f920fb5e42b6..fa9439159ebd 100644
--- a/drivers/gpu/drm/i810/i810_dma.c
+++ b/drivers/gpu/drm/i810/i810_dma.c
@@ -130,11 +130,10 @@ static int i810_map_buffer(struct drm_buf *buf, struct drm_file *file_priv)
return -EINVAL;
/* This is all entirely broken */
- down_write(&current->mm->mmap_sem);
old_fops = file_priv->filp->f_op;
file_priv->filp->f_op = &i810_buffer_fops;
dev_priv->mmap_buffer = buf;
- buf_priv->virtual = (void *)do_mmap(file_priv->filp, 0, buf->total,
+ buf_priv->virtual = (void *)vm_mmap(file_priv->filp, 0, buf->total,
PROT_READ | PROT_WRITE,
MAP_SHARED, buf->bus_address);
dev_priv->mmap_buffer = NULL;
@@ -145,7 +144,6 @@ static int i810_map_buffer(struct drm_buf *buf, struct drm_file *file_priv)
retcode = PTR_ERR(buf_priv->virtual);
buf_priv->virtual = NULL;
}
- up_write(&current->mm->mmap_sem);
return retcode;
}
OpenPOWER on IntegriCloud