diff options
author | Andrew Morton <akpm@osdl.org> | 2006-08-14 11:35:15 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-09-22 05:32:32 +1000 |
commit | a1d0fcf5a1cf56ae4711c7e0f857832724a67e8b (patch) | |
tree | 2773f67ec366cecdf18de83a0df867ce7164fe93 | |
parent | c29b669caae4ed1630ef479e54bdde126a0378ec (diff) |
drm: remove FALSE/TRUE that snuck in with simple memory manager changes.
Thanks to Andrew Morton for pointing these out, I've fixed a few his patch
missed.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
-rw-r--r-- | drivers/char/drm/drm_bufs.c | 2 | ||||
-rw-r--r-- | drivers/char/drm/drm_mm.c | 14 | ||||
-rw-r--r-- | drivers/char/drm/drm_sman.c | 2 | ||||
-rw-r--r-- | drivers/char/drm/drm_sman.h | 2 | ||||
-rw-r--r-- | drivers/char/drm/sis_mm.c | 12 | ||||
-rw-r--r-- | drivers/char/drm/via_mm.c | 6 |
6 files changed, 19 insertions, 19 deletions
diff --git a/drivers/char/drm/drm_bufs.c b/drivers/char/drm/drm_bufs.c index dde612091005..71d2e0917636 100644 --- a/drivers/char/drm/drm_bufs.c +++ b/drivers/char/drm/drm_bufs.c @@ -248,7 +248,7 @@ static int drm_addmap_core(drm_device_t * dev, unsigned int offset, /* We do it here so that dev->struct_mutex protects the increment */ user_token = (map->type == _DRM_SHM) ? (unsigned long)map->handle : map->offset; - ret = drm_map_handle(dev, &list->hash, user_token, FALSE); + ret = drm_map_handle(dev, &list->hash, user_token, 0); if (ret) { drm_free(map, sizeof(*map), DRM_MEM_MAPS); drm_free(list, sizeof(*list), DRM_MEM_MAPS); 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, if (parent->size == size) { list_del_init(&parent->fl_entry); - parent->free = FALSE; + parent->free = 0; return parent; } else { 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, INIT_LIST_HEAD(&child->ml_entry); INIT_LIST_HEAD(&child->fl_entry); - child->free = FALSE; + child->free = 0; child->size = size; child->start = parent->start; @@ -89,13 +89,13 @@ void drm_mm_put_block(drm_mm_t * mm, drm_mm_node_t * cur) drm_mm_node_t *prev_node = NULL; drm_mm_node_t *next_node; - int merged = FALSE; + int merged = 0; if (cur_head->prev != root_head) { prev_node = list_entry(cur_head->prev, drm_mm_node_t, ml_entry); if (prev_node->free) { prev_node->size += cur->size; - merged = TRUE; + merged = 1; } } if (cur_head->next != root_head) { @@ -110,12 +110,12 @@ void drm_mm_put_block(drm_mm_t * mm, drm_mm_node_t * cur) } else { next_node->size += cur->size; next_node->start = cur->start; - merged = TRUE; + merged = 1; } } } if (!merged) { - cur->free = TRUE; + cur->free = 1; list_add(&cur->fl_entry, &list_root->fl_entry); } else { list_del(&cur->ml_entry); @@ -169,7 +169,7 @@ int drm_mm_init(drm_mm_t * mm, unsigned long start, unsigned long size) child->start = start; child->size = size; - child->free = TRUE; + child->free = 1; list_add(&child->fl_entry, &mm->root_node.fl_entry); list_add(&child->ml_entry, &mm->root_node.ml_entry); diff --git a/drivers/char/drm/drm_sman.c b/drivers/char/drm/drm_sman.c index baba91398911..b92f0ee74b39 100644 --- a/drivers/char/drm/drm_sman.c +++ b/drivers/char/drm/drm_sman.c @@ -91,7 +91,7 @@ static void *drm_sman_mm_allocate(void *private, unsigned long size, drm_mm_t *mm = (drm_mm_t *) private; drm_mm_node_t *tmp; - tmp = drm_mm_search_free(mm, size, alignment, TRUE); + tmp = drm_mm_search_free(mm, size, alignment, 1); if (!tmp) { return NULL; } diff --git a/drivers/char/drm/drm_sman.h b/drivers/char/drm/drm_sman.h index 7c48360f114e..ddc732a1bf27 100644 --- a/drivers/char/drm/drm_sman.h +++ b/drivers/char/drm/drm_sman.h @@ -148,7 +148,7 @@ extern drm_memblock_item_t *drm_sman_alloc(drm_sman_t * sman, extern int drm_sman_free_key(drm_sman_t * sman, unsigned int key); /* - * returns TRUE iff there are no stale memory blocks associated with this owner. + * returns 1 iff there are no stale memory blocks associated with this owner. * Typically called to determine if we need to idle the hardware and call * drm_sman_owner_cleanup. If there are no stale memory blocks, it removes all * resources associated with owner. diff --git a/drivers/char/drm/sis_mm.c b/drivers/char/drm/sis_mm.c index 3041c5b42d56..1b21e324d04e 100644 --- a/drivers/char/drm/sis_mm.c +++ b/drivers/char/drm/sis_mm.c @@ -111,7 +111,7 @@ static int sis_fb_init(DRM_IOCTL_ARGS) return ret; } - dev_priv->vram_initialized = TRUE; + dev_priv->vram_initialized = 1; dev_priv->vram_offset = fb.offset; mutex_unlock(&dev->struct_mutex); @@ -133,7 +133,7 @@ static int sis_drm_alloc(drm_device_t * dev, drm_file_t * priv, mutex_lock(&dev->struct_mutex); - if (FALSE == ((pool == 0) ? dev_priv->vram_initialized : + if (0 == ((pool == 0) ? dev_priv->vram_initialized : dev_priv->agp_initialized)) { DRM_ERROR ("Attempt to allocate from uninitialized memory manager.\n"); @@ -211,7 +211,7 @@ static int sis_ioctl_agp_init(DRM_IOCTL_ARGS) return ret; } - dev_priv->agp_initialized = TRUE; + dev_priv->agp_initialized = 1; dev_priv->agp_offset = agp.offset; mutex_unlock(&dev->struct_mutex); @@ -284,7 +284,7 @@ int sis_idle(drm_device_t *dev) if (time_after_eq(jiffies, end)) { DRM_ERROR("Graphics engine idle timeout. " "Disabling idle check\n"); - dev_priv->idle_fault = TRUE; + dev_priv->idle_fault = 1; } /* @@ -305,8 +305,8 @@ void sis_lastclose(struct drm_device *dev) mutex_lock(&dev->struct_mutex); drm_sman_cleanup(&dev_priv->sman); - dev_priv->vram_initialized = FALSE; - dev_priv->agp_initialized = FALSE; + dev_priv->vram_initialized = 0; + dev_priv->agp_initialized = 0; dev_priv->mmio = NULL; mutex_unlock(&dev->struct_mutex); } diff --git a/drivers/char/drm/via_mm.c b/drivers/char/drm/via_mm.c index 9d9237ef9448..d6c08e1d768f 100644 --- a/drivers/char/drm/via_mm.c +++ b/drivers/char/drm/via_mm.c @@ -116,8 +116,8 @@ void via_lastclose(struct drm_device *dev) mutex_lock(&dev->struct_mutex); drm_sman_cleanup(&dev_priv->sman); - dev_priv->vram_initialized = FALSE; - dev_priv->agp_initialized = FALSE; + dev_priv->vram_initialized = 0; + dev_priv->agp_initialized = 0; mutex_unlock(&dev->struct_mutex); } @@ -139,7 +139,7 @@ int via_mem_alloc(DRM_IOCTL_ARGS) return DRM_ERR(EINVAL); } mutex_lock(&dev->struct_mutex); - if (FALSE == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized : + if (0 == ((mem.type == VIA_MEM_VIDEO) ? dev_priv->vram_initialized : dev_priv->agp_initialized)) { DRM_ERROR ("Attempt to allocate from uninitialized memory manager.\n"); |