]> err.no Git - linux-2.6/commitdiff
[AGPGART] intel-agp: Use ARRAY_SIZE macro when appropriate
authorAhmed S. Darwish <darwish.07@gmail.com>
Tue, 6 Feb 2007 16:08:28 +0000 (18:08 +0200)
committerDave Jones <davej@redhat.com>
Tue, 6 Feb 2007 16:45:57 +0000 (11:45 -0500)
use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Signed-off-by: Dave Jones <davej@redhat.com>
drivers/char/agp/intel-agp.c

index 49cf7e2df47af95ed350577e781df8ab14f512c3..6b9fb2179264ee602af0d893c8e1edd71a3f32b9 100644 (file)
@@ -5,6 +5,7 @@
 #include <linux/module.h>
 #include <linux/pci.h>
 #include <linux/init.h>
+#include <linux/kernel.h>
 #include <linux/pagemap.h>
 #include <linux/agp_backend.h>
 #include "agp.h"
@@ -846,7 +847,7 @@ static int intel_i915_remove_entries(struct agp_memory *mem,off_t pg_start,
  */
 static int intel_i9xx_fetch_size(void)
 {
-       int num_sizes = sizeof(intel_i830_sizes) / sizeof(*intel_i830_sizes);
+       int num_sizes = ARRAY_SIZE(intel_i830_sizes);
        int aper_size; /* size in megabytes */
        int i;