]> err.no Git - linux-2.6/blobdiff - Documentation/DocBook/mtdnand.tmpl
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
[linux-2.6] / Documentation / DocBook / mtdnand.tmpl
index 999afe1ca8cbf33151e8504f753848c052b3539b..6fbc41d98c1eb56a0779499ed6d9dd8ce45235f6 100644 (file)
                for most of the implementations. These functions can be replaced by the
                board driver if neccecary. Those functions are called via pointers in the
                NAND chip description structure. The board driver can set the functions which
-               should be replaced by board dependend functions before calling nand_scan().
+               should be replaced by board dependent functions before calling nand_scan().
                If the function pointer is NULL on entry to nand_scan() then the pointer
                is set to the default function which is suitable for the detected chip type.
                </para></listitem>
                [REPLACEABLE]</para><para>
                Replaceable members hold hardware related functions which can be 
                provided by the board driver. The board driver can set the functions which
-               should be replaced by board dependend functions before calling nand_scan().
+               should be replaced by board dependent functions before calling nand_scan().
                If the function pointer is NULL on entry to nand_scan() then the pointer
                is set to the default function which is suitable for the detected chip type.
                </para></listitem>
        <title>Basic board driver</title>
        <para>
                For most boards it will be sufficient to provide just the
-               basic functions and fill out some really board dependend
+               basic functions and fill out some really board dependent
                members in the nand chip description structure.
-               See drivers/mtd/nand/skeleton for reference.
        </para>
        <sect1>
                <title>Basic defines</title>
@@ -276,16 +275,13 @@ 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 */
        baseaddr = (unsigned long)ioremap(CHIP_PHYSICAL_ADDRESS, 1024);
        if(!baseaddr){
@@ -1295,7 +1291,9 @@ in this page</entry>
      </para>
 !Idrivers/mtd/nand/nand_base.c
 !Idrivers/mtd/nand/nand_bbt.c
-!Idrivers/mtd/nand/nand_ecc.c
+<!-- No internal functions for kernel-doc:
+X!Idrivers/mtd/nand/nand_ecc.c
+-->
   </chapter>
 
   <chapter id="credits">