aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorMariusz Kozlowski <m.kozlowski@tuxland.pl>2007-07-31 17:22:18 -0400
committerDavid Woodhouse <dwmw2@infradead.org>2007-08-01 06:03:17 -0400
commit40562f812bb4b0211da07ad1927af030b089d3d3 (patch)
treee468fce1d6b200fd17e206924837ab5a553d7a37 /Documentation
parentd67d1d7fc344e44b51296327a0b09a9419ca307f (diff)
Documentation/DocBook/mtdnand.tmpl: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/DocBook/mtdnand.tmpl5
1 files changed, 1 insertions, 4 deletions
diff --git a/Documentation/DocBook/mtdnand.tmpl b/Documentation/DocBook/mtdnand.tmpl
index a8c8cce50633..6fbc41d98c1e 100644
--- a/Documentation/DocBook/mtdnand.tmpl
+++ b/Documentation/DocBook/mtdnand.tmpl
@@ -275,16 +275,13 @@ int __init board_init (void)
275 int err = 0; 275 int err = 0;
276 276
277 /* Allocate memory for MTD device structure and private data */ 277 /* Allocate memory for MTD device structure and private data */
278 board_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), GFP_KERNEL); 278 board_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL);
279 if (!board_mtd) { 279 if (!board_mtd) {
280 printk ("Unable to allocate NAND MTD device structure.\n"); 280 printk ("Unable to allocate NAND MTD device structure.\n");
281 err = -ENOMEM; 281 err = -ENOMEM;
282 goto out; 282 goto out;
283 } 283 }
284 284
285 /* Initialize structures */
286 memset ((char *) board_mtd, 0, sizeof(struct mtd_info) + sizeof(struct nand_chip));
287
288 /* map physical adress */ 285 /* map physical adress */
289 baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024); 286 baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
290 if(!baseaddr){ 287 if(!baseaddr){