]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/chips/gen_probe.c
[MTD] [NOR] fix cfi_cmdset_0001 FL_SYNCING race (take 2)
[linux-2.6-omap-h63xx.git] / drivers / mtd / chips / gen_probe.c
index d338b8c92780255d9d71a62f9484010a0cac7b64..e2dc96441e05e0a6affa6c5fa2611fef0f545d9e 100644 (file)
@@ -2,7 +2,6 @@
  * Routines common to all CFI-type probes.
  * (C) 2001-2003 Red Hat, Inc.
  * GPL'd
- * $Id: gen_probe.c,v 1.24 2005/11/07 11:14:23 gleixner Exp $
  */
 
 #include <linux/kernel.h>
@@ -71,8 +70,8 @@ static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chi
           interleave and device type, etc. */
        if (!genprobe_new_chip(map, cp, &cfi)) {
                /* The probe didn't like it */
-               printk(KERN_DEBUG "%s: Found no %s device at location zero\n",
-                      cp->name, map->name);
+               pr_debug("%s: Found no %s device at location zero\n",
+                        cp->name, map->name);
                return NULL;
        }
 
@@ -112,7 +111,7 @@ static struct cfi_private *genprobe_ident_chips(struct map_info *map, struct chi
                max_chips = 1;
        }
 
-       mapsize = sizeof(long) * ( (max_chips + BITS_PER_LONG-1) / BITS_PER_LONG );
+       mapsize = sizeof(long) * DIV_ROUND_UP(max_chips, BITS_PER_LONG);
        chip_map = kzalloc(mapsize, GFP_KERNEL);
        if (!chip_map) {
                printk(KERN_WARNING "%s: kmalloc failed for CFI chip map\n", map->name);