summaryrefslogtreecommitdiff
path: root/shared-core
diff options
context:
space:
mode:
Diffstat (limited to 'shared-core')
-rw-r--r--shared-core/i915_mem.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/shared-core/i915_mem.c b/shared-core/i915_mem.c
index 58f7b888..0e413d47 100644
--- a/shared-core/i915_mem.c
+++ b/shared-core/i915_mem.c
@@ -82,7 +82,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size,
goto out;
newblock->start = start;
newblock->size = p->size - (start - p->start);
- newblock->filp = 0;
+ newblock->filp = NULL;
newblock->next = p->next;
newblock->prev = p;
p->next->prev = newblock;
@@ -98,7 +98,7 @@ static struct mem_block *split_block(struct mem_block *p, int start, int size,
goto out;
newblock->start = start + size;
newblock->size = p->size - size;
- newblock->filp = 0;
+ newblock->filp = NULL;
newblock->next = p->next;
newblock->prev = p;
p->next->prev = newblock;
@@ -120,7 +120,7 @@ static struct mem_block *alloc_block( struct mem_block *heap, int size,
for (p = heap->next ; p != heap ; p = p->next) {
int start = (p->start + mask) & ~mask;
- if (p->filp == 0 && start + size <= p->start + p->size)
+ if (p->filp == NULL && start + size <= p->start + p->size)
return split_block( p, start, size, filp );
}
@@ -141,12 +141,12 @@ static struct mem_block *find_block( struct mem_block *heap, int start )
static void free_block( struct mem_block *p )
{
- p->filp = 0;
+ p->filp = NULL;
/* Assumes a single contiguous range. Needs a special filp in
* 'heap' to stop it being subsumed.
*/
- if (p->next->filp == 0) {
+ if (p->next->filp == NULL) {
struct mem_block *q = p->next;
p->size += q->size;
p->next = q->next;
@@ -154,7 +154,7 @@ static void free_block( struct mem_block *p )
DRM_FREE(q, sizeof(*q));
}
- if (p->prev->filp == 0) {
+ if (p->prev->filp == NULL) {
struct mem_block *q = p->prev;
q->size += p->size;
q->next = p->next;
@@ -180,7 +180,7 @@ static int init_heap(struct mem_block **heap, int start, int size)
blocks->start = start;
blocks->size = size;
- blocks->filp = 0;
+ blocks->filp = NULL;
blocks->next = blocks->prev = *heap;
memset( *heap, 0, sizeof(**heap) );
@@ -202,7 +202,7 @@ void i915_mem_release( drm_device_t *dev,
for (p = heap->next ; p != heap ; p = p->next) {
if (p->filp == filp) {
- p->filp = 0;
+ p->filp = NULL;
mark_block( dev, p, 0 );
}
}
@@ -211,7 +211,7 @@ void i915_mem_release( drm_device_t *dev,
* 'heap' to stop it being subsumed.
*/
for (p = heap->next ; p != heap ; p = p->next) {
- while (p->filp == 0 && p->next->filp == 0) {
+ while (p->filp == NULL && p->next->filp == NULL) {
struct mem_block *q = p->next;
p->size += q->size;
p->next = q->next;