[Blackfin] arch: Fix gpio label handling
[safe/jmp/linux-2.6] / Documentation / DocBook / mtdnand.tmpl
index 630159c..957cf5c 100644 (file)
@@ -188,9 +188,9 @@ static unsigned long baseaddr;
        <sect1>
                <title>Partition defines</title>
                <para>
-                       If you want to divide your device into parititions, then
-                       enable the configuration switch CONFIG_MTD_PARITIONS and define
-                       a paritioning scheme suitable to your board.
+                       If you want to divide your device into partitions, then
+                       enable the configuration switch CONFIG_MTD_PARTITIONS and define
+                       a partitioning scheme suitable to your board.
                </para>
                <programlisting>
 #define NUM_PARTITIONS 2
@@ -275,17 +275,14 @@ int __init board_init (void)
        int err = 0;
 
        /* Allocate memory for MTD device structure and private data */
-       board_mtd = kmalloc (sizeof(struct mtd_info) + sizeof (struct nand_chip), GFP_KERNEL);
+       board_mtd = kzalloc(sizeof(struct mtd_info) + sizeof(struct nand_chip), GFP_KERNEL);
        if (!board_mtd) {
                printk ("Unable to allocate NAND MTD device structure.\n");
                err = -ENOMEM;
                goto out;
        }
 
-       /* Initialize structures */
-       memset ((char *) board_mtd, 0, sizeof(struct mtd_info) + sizeof(struct nand_chip));
-
-       /* map physical adress */
+       /* map physical address */
        baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
        if(!baseaddr){
                printk("Ioremap to access NAND chip failed\n");
@@ -309,7 +306,7 @@ int __init board_init (void)
        this->dev_ready = board_dev_ready;
        this->eccmode = NAND_ECC_SOFT;
 
-       /* Scan to find existance of the device */
+       /* Scan to find existence of the device */
        if (nand_scan (board_mtd, 1)) {
                err = -ENXIO;
                goto out_ior;
@@ -343,7 +340,7 @@ static void __exit board_cleanup (void)
        /* Release resources, unregister device */
        nand_release (board_mtd);
 
-       /* unmap physical adress */
+       /* unmap physical address */
        iounmap((void *)baseaddr);
        
        /* Free the MTD device structure */