aboutsummaryrefslogtreecommitdiff
path: root/drivers/mtd/chips/gen_probe.c
diff options
context:
space:
mode:
authorJulia Lawall <julia@diku.dk>2008-08-02 17:14:21 +0200
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-08-02 18:45:18 +0100
commitc8872b069c536976b81bccfc95dda945594bc504 (patch)
treeff131bea50915d6ba95638a51a309af39e32cb84 /drivers/mtd/chips/gen_probe.c
parentc4308d1076830a72e05eb3e5f58b9ed851229399 (diff)
[MTD] Use DIV_ROUND_UP
The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) - 1) / (d)) but is perhaps more readable. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/chips/gen_probe.c')
-rw-r--r--drivers/mtd/chips/gen_probe.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/chips/gen_probe.c b/drivers/mtd/chips/gen_probe.c
index f061885b281..e2dc96441e0 100644
--- a/drivers/mtd/chips/gen_probe.c
+++ b/drivers/mtd/chips/gen_probe.c
@@ -111,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);