mtd: gen_probe: Use bitmap_zalloc() when applicable
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 21 Nov 2021 15:59:12 +0000 (16:59 +0100)
committerMiquel Raynal <miquel.raynal@bootlin.com>
Thu, 9 Dec 2021 16:52:29 +0000 (17:52 +0100)
commitdd8a2e884a462c09a562f04927cb227e3cdaa498
tree016bcb291cf2887f00fd34d82197e73f6eb688f0
parent67b967ddd93d0ed57d392a00f6f90060f0910c0e
mtd: gen_probe: Use bitmap_zalloc() when applicable

'chip_map' is a bitmap. So use 'bitmap_zalloc()' to simplify code,
improve the semantic and avoid some open-coded arithmetic in allocator
arguments.

Also change the corresponding 'kfree()' into 'bitmap_free()' to keep
consistency.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/a6fe58dffe553a3e79303777d3ba9c60d7613c5b.1637510255.git.christophe.jaillet@wanadoo.fr
drivers/mtd/chips/gen_probe.c