diff options
author | Ian Romanick <idr@us.ibm.com> | 2007-08-06 16:17:23 -0700 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2007-08-06 16:17:23 -0700 |
commit | 90907c59152f628d6f0efea4927a06e547f4a3c7 (patch) | |
tree | 9bae338845d3446c6e131e9d96afadb038a2386c /linux-core/xgi_fb.c | |
parent | f96bff9e213a950ab910832908d30e732435e628 (diff) |
Replace per-heap semaphores with drm_device::struct_mutex.
Diffstat (limited to 'linux-core/xgi_fb.c')
-rw-r--r-- | linux-core/xgi_fb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/linux-core/xgi_fb.c b/linux-core/xgi_fb.c index 1d5dc22b..373c45dd 100644 --- a/linux-core/xgi_fb.c +++ b/linux-core/xgi_fb.c @@ -247,11 +247,11 @@ int xgi_alloc(struct xgi_info * info, struct xgi_mem_alloc * alloc, { struct xgi_mem_block *block; - down(&info->fb_sem); + mutex_lock(&info->dev->struct_mutex); block = xgi_mem_alloc((alloc->location == XGI_MEMLOC_LOCAL) ? &info->fb_heap : &info->pcie_heap, alloc->size); - up(&info->fb_sem); + mutex_unlock(&info->dev->struct_mutex); if (block == NULL) { alloc->size = 0; @@ -292,9 +292,9 @@ int xgi_fb_free(struct xgi_info * info, unsigned long offset, { int err = 0; - down(&info->fb_sem); + mutex_lock(&info->dev->struct_mutex); err = xgi_mem_free(&info->fb_heap, offset, filp); - up(&info->fb_sem); + mutex_unlock(&info->dev->struct_mutex); return err; } @@ -324,7 +324,7 @@ void xgi_fb_free_all(struct xgi_info * info, struct drm_file * filp) return; } - down(&info->fb_sem); + mutex_lock(&info->dev->struct_mutex); do { struct xgi_mem_block *block; @@ -342,5 +342,5 @@ void xgi_fb_free_all(struct xgi_info * info, struct drm_file * filp) (void) xgi_mem_free(&info->fb_heap, block->offset, filp); } while(1); - up(&info->fb_sem); + mutex_unlock(&info->dev->struct_mutex); } |