agp: more boolean conversions.
authorDave Airlie <airlied@redhat.com>
Thu, 19 Jun 2008 00:42:17 +0000 (10:42 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 19 Jun 2008 00:42:17 +0000 (10:42 +1000)
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/char/agp/compat_ioctl.c
drivers/char/agp/frontend.c
drivers/char/agp/generic.c
drivers/char/agp/intel-agp.c
include/linux/agp_backend.h
include/linux/agpgart.h

index 39275794fe63a433edd5760b740af63ee12bf062..58c57cb2518cc7dcd4322c4bfbd97eeab69afdcb 100644 (file)
@@ -214,7 +214,7 @@ long compat_agp_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                ret_val = -EINVAL;
                goto ioctl_out;
        }
-       if ((agp_fe.backend_acquired != TRUE) &&
+       if ((agp_fe.backend_acquired != true) &&
            (cmd != AGPIOC_ACQUIRE32)) {
                ret_val = -EBUSY;
                goto ioctl_out;
index 857b26227d87d69b894f51609a5307fd68ea4bab..e6cb1ab03e06fb115d532de211d584eff2b539f5 100644 (file)
@@ -395,7 +395,7 @@ static int agp_remove_controller(struct agp_controller *controller)
 
        if (agp_fe.current_controller == controller) {
                agp_fe.current_controller = NULL;
-               agp_fe.backend_acquired = FALSE;
+               agp_fe.backend_acquired = false;
                agp_backend_release(agp_bridge);
        }
        kfree(controller);
@@ -443,7 +443,7 @@ static void agp_controller_release_current(struct agp_controller *controller,
        }
 
        agp_fe.current_controller = NULL;
-       agp_fe.used_by_controller = FALSE;
+       agp_fe.used_by_controller = false;
        agp_backend_release(agp_bridge);
 }
 
@@ -573,7 +573,7 @@ static int agp_mmap(struct file *file, struct vm_area_struct *vma)
 
        mutex_lock(&(agp_fe.agp_mutex));
 
-       if (agp_fe.backend_acquired != TRUE)
+       if (agp_fe.backend_acquired != true)
                goto out_eperm;
 
        if (!(test_bit(AGP_FF_IS_VALID, &priv->access_flags)))
@@ -768,7 +768,7 @@ int agpioc_acquire_wrap(struct agp_file_private *priv)
 
        atomic_inc(&agp_bridge->agp_in_use);
 
-       agp_fe.backend_acquired = TRUE;
+       agp_fe.backend_acquired = true;
 
        controller = agp_find_controller_by_pid(priv->my_pid);
 
@@ -778,7 +778,7 @@ int agpioc_acquire_wrap(struct agp_file_private *priv)
                controller = agp_create_controller(priv->my_pid);
 
                if (controller == NULL) {
-                       agp_fe.backend_acquired = FALSE;
+                       agp_fe.backend_acquired = false;
                        agp_backend_release(agp_bridge);
                        return -ENOMEM;
                }
@@ -981,7 +981,7 @@ static long agp_ioctl(struct file *file,
                ret_val = -EINVAL;
                goto ioctl_out;
        }
-       if ((agp_fe.backend_acquired != TRUE) &&
+       if ((agp_fe.backend_acquired != true) &&
            (cmd != AGPIOC_ACQUIRE)) {
                ret_val = -EBUSY;
                goto ioctl_out;
index 3e3625affdd18b8bfd7dfed356be7667997488b4..564daaa6c7d0ef7bf98e4701e2b9b1b1253a2b34 100644 (file)
@@ -96,13 +96,13 @@ EXPORT_SYMBOL(agp_flush_chipset);
 void agp_alloc_page_array(size_t size, struct agp_memory *mem)
 {
        mem->memory = NULL;
-       mem->vmalloc_flag = 0;
+       mem->vmalloc_flag = false;
 
        if (size <= 2*PAGE_SIZE)
                mem->memory = kmalloc(size, GFP_KERNEL | __GFP_NORETRY);
        if (mem->memory == NULL) {
                mem->memory = vmalloc(size);
-               mem->vmalloc_flag = 1;
+               mem->vmalloc_flag = true;
        }
 }
 EXPORT_SYMBOL(agp_alloc_page_array);
index 6800b7e5b6f5a8b3ed84f42848a952ce19fd0f01..02356595ac1c99e9468d0acdd2f98d45fab2ca04 100644 (file)
@@ -325,7 +325,7 @@ static int intel_i810_insert_entries(struct agp_memory *mem, off_t pg_start,
 out:
        ret = 0;
 out_err:
-       mem->is_flushed = 1;
+       mem->is_flushed = true;
        return ret;
 }
 
@@ -795,7 +795,7 @@ static int intel_i830_insert_entries(struct agp_memory *mem, off_t pg_start,
 out:
        ret = 0;
 out_err:
-       mem->is_flushed = 1;
+       mem->is_flushed = true;
        return ret;
 }
 
@@ -1022,7 +1022,7 @@ static int intel_i915_insert_entries(struct agp_memory *mem, off_t pg_start,
  out:
        ret = 0;
  out_err:
-       mem->is_flushed = 1;
+       mem->is_flushed = true;
        return ret;
 }
 
index 09b4478ffacdaf547692ce3a5f65131a3738f5fc..972b12bcfb36a1ca8ea6bd9ce8fdac0b61ecbf7f 100644 (file)
@@ -77,7 +77,7 @@ struct agp_memory {
        u32 physical;
        bool is_bound;
        bool is_flushed;
-        u8 vmalloc_flag;
+        bool vmalloc_flag;
 };
 
 #define AGP_NORMAL_MEMORY 0
index 62aef589eb940936d6adb53889165b4e1f17dba2..c8fdb6e658e1912ed64e81517cd8948ac1c0ebe0 100644 (file)
@@ -206,8 +206,8 @@ struct agp_front_data {
        struct agp_controller *current_controller;
        struct agp_controller *controllers;
        struct agp_file_private *file_priv_list;
-       u8 used_by_controller;
-       u8 backend_acquired;
+       bool used_by_controller;
+       bool backend_acquired;
 };
 
 #endif                         /* __KERNEL__ */