aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/drm/drm_mm.c')
-rw-r--r--drivers/char/drm/drm_mm.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/char/drm/drm_mm.c b/drivers/char/drm/drm_mm.c
index c55ed45a8944..617526bd5b0c 100644
--- a/drivers/char/drm/drm_mm.c
+++ b/drivers/char/drm/drm_mm.c
@@ -54,7 +54,7 @@ drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent,
54 54
55 if (parent->size == size) { 55 if (parent->size == size) {
56 list_del_init(&parent->fl_entry); 56 list_del_init(&parent->fl_entry);
57 parent->free = FALSE; 57 parent->free = 0;
58 return parent; 58 return parent;
59 } else { 59 } else {
60 child = (drm_mm_node_t *) drm_alloc(sizeof(*child), DRM_MEM_MM); 60 child = (drm_mm_node_t *) drm_alloc(sizeof(*child), DRM_MEM_MM);
@@ -64,7 +64,7 @@ drm_mm_node_t *drm_mm_get_block(drm_mm_node_t * parent,
64 INIT_LIST_HEAD(&child->ml_entry); 64 INIT_LIST_HEAD(&child->ml_entry);
65 INIT_LIST_HEAD(&child->fl_entry); 65 INIT_LIST_HEAD(&child->fl_entry);
66 66
67 child->free = FALSE; 67 child->free = 0;
68 child->size = size; 68 child->size = size;
69 child->start = parent->start; 69 child->start = parent->start;
70 70
@@ -89,13 +89,13 @@ void drm_mm_put_block(drm_mm_t * mm, drm_mm_node_t * cur)
89 drm_mm_node_t *prev_node = NULL; 89 drm_mm_node_t *prev_node = NULL;
90 drm_mm_node_t *next_node; 90 drm_mm_node_t *next_node;
91 91
92 int merged = FALSE; 92 int merged = 0;
93 93
94 if (cur_head->prev != root_head) { 94 if (cur_head->prev != root_head) {
95 prev_node = list_entry(cur_head->prev, drm_mm_node_t, ml_entry); 95 prev_node = list_entry(cur_head->prev, drm_mm_node_t, ml_entry);
96 if (prev_node->free) { 96 if (prev_node->free) {
97 prev_node->size += cur->size; 97 prev_node->size += cur->size;
98 merged = TRUE; 98 merged = 1;
99 } 99 }
100 } 100 }
101 if (cur_head->next != root_head) { 101 if (cur_head->next != root_head) {
@@ -110,12 +110,12 @@ void drm_mm_put_block(drm_mm_t * mm, drm_mm_node_t * cur)
110 } else { 110 } else {
111 next_node->size += cur->size; 111 next_node->size += cur->size;
112 next_node->start = cur->start; 112 next_node->start = cur->start;
113 merged = TRUE; 113 merged = 1;
114 } 114 }
115 } 115 }
116 } 116 }
117 if (!merged) { 117 if (!merged) {
118 cur->free = TRUE; 118 cur->free = 1;
119 list_add(&cur->fl_entry, &list_root->fl_entry); 119 list_add(&cur->fl_entry, &list_root->fl_entry);
120 } else { 120 } else {
121 list_del(&cur->ml_entry); 121 list_del(&cur->ml_entry);
@@ -169,7 +169,7 @@ int drm_mm_init(drm_mm_t * mm, unsigned long start, unsigned long size)
169 169
170 child->start = start; 170 child->start = start;
171 child->size = size; 171 child->size = size;
172 child->free = TRUE; 172 child->free = 1;
173 173
174 list_add(&child->fl_entry, &mm->root_node.fl_entry); 174 list_add(&child->fl_entry, &mm->root_node.fl_entry);
175 list_add(&child->ml_entry, &mm->root_node.ml_entry); 175 list_add(&child->ml_entry, &mm->root_node.ml_entry);