aboutsummaryrefslogtreecommitdiff
path: root/linux-core/xgi_fb.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-08-06 16:35:07 -0700
committerIan Romanick <idr@us.ibm.com>2007-08-06 16:35:07 -0700
commitf3072becda3a2d5fe587f20e155d4d4f9ace60a2 (patch)
tree4d5736c1179f32b9b1c1902f06dce3ee3cfc16d2 /linux-core/xgi_fb.c
parent90907c59152f628d6f0efea4927a06e547f4a3c7 (diff)
Refactor xgi_(fb|pcie)_free_all into xgi_free_all.
Diffstat (limited to 'linux-core/xgi_fb.c')
-rw-r--r--linux-core/xgi_fb.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/linux-core/xgi_fb.c b/linux-core/xgi_fb.c
index 373c45dd..f8341a67 100644
--- a/linux-core/xgi_fb.c
+++ b/linux-core/xgi_fb.c
@@ -318,29 +318,27 @@ int xgi_fb_heap_init(struct xgi_info * info)
/**
* Free all blocks associated with a particular file handle.
*/
-void xgi_fb_free_all(struct xgi_info * info, struct drm_file * filp)
+void xgi_free_all(struct xgi_info * info, struct xgi_mem_heap * heap,
+ struct drm_file * filp)
{
- if (!info->fb_heap.initialized) {
+ if (!heap->initialized) {
return;
}
- mutex_lock(&info->dev->struct_mutex);
do {
struct xgi_mem_block *block;
- list_for_each_entry(block, &info->fb_heap.used_list, list) {
+ list_for_each_entry(block, &heap->used_list, list) {
if (block->filp == filp) {
break;
}
}
- if (&block->list == &info->fb_heap.used_list) {
+ if (&block->list == &heap->used_list) {
break;
}
- (void) xgi_mem_free(&info->fb_heap, block->offset, filp);
+ (void) xgi_mem_free(heap, block->offset, filp);
} while(1);
-
- mutex_unlock(&info->dev->struct_mutex);
}