]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
Fixing coding style issues
authorWilliam Juul <william.juul@datarespons.no>
Fri, 9 Nov 2007 12:32:30 +0000 (13:32 +0100)
committerScott Wood <scottwood@freescale.com>
Tue, 12 Aug 2008 16:31:17 +0000 (11:31 -0500)
 - Fixing leading white spaces
 - Fixing indentation where 4 spaces are used instead of tab
 - Removing C++ comments (//), wherever I introduced them

Signed-off-by: William Juul <william.juul@tandberg.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
18 files changed:
board/bf537-stamp/nand.c
board/dave/PPChameleonEVB/nand.c
board/delta/nand.c
board/esd/common/esd405ep_nand.c
board/nc650/nand.c
board/netstar/nand.c
board/prodrive/alpr/nand.c
board/prodrive/pdnb3/nand.c
board/sc3/sc3nand.c
board/tqc/tqm8272/tqm8272.c
board/zylonite/nand.c
common/cmd_nand.c
cpu/arm926ejs/davinci/nand.c
cpu/ppc4xx/ndfc.c
drivers/mtd/nand/diskonchip.c
drivers/mtd/nand/nand_base.c
include/linux/mtd/compat.h
include/linux/mtd/nand.h

index d90bdd071c97f1f01cad64c9305c486261dc89c7..9800083c9e9fc993749f0a92b725fbf92053f8bb 100644 (file)
@@ -40,7 +40,7 @@
 static void bfin_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
        register struct nand_chip *this = mtd->priv;
-    u32 IO_ADDR_W = (u32) this->IO_ADDR_W;
+       u32 IO_ADDR_W = (u32) this->IO_ADDR_W;
 
        if (ctrl & NAND_CTRL_CHANGE) {
                if( ctrl & NAND_CLE )
index ea6400c04973d7d59844fc4882f3370f44933beb..3ccbf650db40a981860ded66ee28d107fb2899a8 100644 (file)
@@ -36,7 +36,7 @@ static void ppchameleonevb_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int
        struct nand_chip *this = mtd->priv;
        ulong base = (ulong) this->IO_ADDR_W;
 
-    if (ctrl & NAND_CTRL_CHANGE) {
+       if (ctrl & NAND_CTRL_CHANGE) {
                if ( ctrl & NAND_CLE )
                        MACRO_NAND_CTL_SETCLE((unsigned long)base);
                else
@@ -51,7 +51,7 @@ static void ppchameleonevb_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int
                        MACRO_NAND_DISABLE_CE((unsigned long)base);
        }
 
-    if (cmd != NAND_CMD_NONE)
+       if (cmd != NAND_CMD_NONE)
                writeb(cmd, this->IO_ADDR_W);
 }
 
index 51520f5fb03db169dc1105480c345d8db779981c..b007b090d0556348f3761dfccc2a6c9d1c338d19 100644 (file)
@@ -549,7 +549,7 @@ int board_nand_init(struct nand_chip *nand)
        nand->write_buf = dfc_write_buf;
 
        nand->cmdfunc = dfc_cmdfunc;
-//     nand->autooob = &delta_oob;
+/*     nand->autooob = &delta_oob; */
        nand->badblock_pattern = &delta_bbt_descr;
        return 0;
 }
index 4bf81ab4aacb52db1912f4c8503843c02d4d041f..40d1efb081b295abee3425f137e157ba488141e6 100644 (file)
@@ -32,8 +32,8 @@
  */
 static void esd405ep_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-    struct nand_chip *this = mtd->priv;
-    if (ctrl & NAND_CTRL_CHANGE) {
+       struct nand_chip *this = mtd->priv;
+       if (ctrl & NAND_CTRL_CHANGE) {
                if ( ctrl & NAND_CLE )
                        out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_CLE);
                else
@@ -48,7 +48,7 @@ static void esd405ep_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int
                        out_be32((void *)GPIO0_OR, in_be32((void *)GPIO0_OR) | CFG_NAND_CE);
        }
 
-    if (cmd != NAND_CMD_NONE)
+       if (cmd != NAND_CMD_NONE)
                writeb(cmd, this->IO_ADDR_W);
 }
 
index f59f5e2c9c5485e63daa1993710323a169743421..7dca97fdf4aeca70606ef12f63c1916cc93f94ea 100644 (file)
@@ -36,7 +36,7 @@ static void nc650_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
        struct nand_chip *this = mtd->priv;
 
-    if (ctrl & NAND_CTRL_CHANGE) {
+       if (ctrl & NAND_CTRL_CHANGE) {
                if ( ctrl & NAND_CLE )
                        this->IO_ADDR_W += 2;
                else
@@ -47,7 +47,7 @@ static void nc650_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
                        this->IO_ADDR_W -= 1;
        }
 
-    if (cmd != NAND_CMD_NONE)
+       if (cmd != NAND_CMD_NONE)
                writeb(cmd, this->IO_ADDR_W);
 }
 #elif defined(CONFIG_IDS852_REV2)
@@ -58,7 +58,7 @@ static void nc650_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
        struct nand_chip *this = mtd->priv;
 
-    if (ctrl & NAND_CTRL_CHANGE) {
+       if (ctrl & NAND_CTRL_CHANGE) {
                if ( ctrl & NAND_CLE )
                        writeb(0, (volatile __u8 *) this->IO_ADDR_W + 0xa);
                else
@@ -73,7 +73,7 @@ static void nc650_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
                        writeb(0, (volatile __u8 *) this->IO_ADDR_W) + 0xc);
        }
 
-    if (cmd != NAND_CMD_NONE)
+       if (cmd != NAND_CMD_NONE)
                writeb(cmd, this->IO_ADDR_W);
 }
 #else
index 961c92112d1fde0e88a3521e748950d6d05b8bf7..e3ab66f2fbc0421ca8fe6d5995a622e9c3f888c2 100644 (file)
@@ -47,7 +47,7 @@ static void netstar_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int c
        }
        this->IO_ADDR_W = (void __iomem *) IO_ADDR_W;
 
-    if (cmd != NAND_CMD_NONE)
+       if (cmd != NAND_CMD_NONE)
                writeb(cmd, this->IO_ADDR_W);
 }
 
index e1495feea10f892164fa0bef4dc6d702b186b679..99f5737b85ada9bb393e27d8b51a5e090510c6da 100644 (file)
@@ -58,7 +58,7 @@ static struct alpr_ndfc_regs *alpr_ndfc = NULL;
  */
 static void alpr_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-    struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd->priv;
 
        if (ctrl & NAND_CTRL_CHANGE) {
                if ( ctrl & NAND_CLE )
index 281ae70af6157cde821ad2312725cc92dc79fb8a..1ce3c8c618f817461fb9e3cc8344d8cd9c51df5f 100644 (file)
@@ -54,7 +54,7 @@ static struct pdnb3_ndfc_regs *pdnb3_ndfc;
  */
 static void pdnb3_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-    struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd->priv;
 
        if (ctrl & NAND_CTRL_CHANGE) {
                if ( ctrl & NAND_CLE )
index 8ead7c850a8750205fc7b0b911af11157f609f00..45eff28c0ae83aa55bb62737dd3210e68b209104 100644 (file)
@@ -41,8 +41,8 @@ static void *sc3_control_base = (void *)0xEF600700;
 
 static void sc3_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-    struct nand_chip *this = mtd->priv;
-    if (ctrl & NAND_CTRL_CHANGE) {
+       struct nand_chip *this = mtd->priv;
+       if (ctrl & NAND_CTRL_CHANGE) {
                if ( ctrl & NAND_CLE )
                        set_bit (SC3_NAND_CLE, sc3_control_base);
                else
@@ -57,7 +57,7 @@ static void sc3_nand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
                        clear_bit (SC3_NAND_CE, sc3_control_base);
        }
 
-    if (cmd != NAND_CMD_NONE)
+       if (cmd != NAND_CMD_NONE)
                writeb(cmd, this->IO_ADDR_W);
 }
 
index 5148f3de5fc902a79b1cc1e1c95af5c6306c2181..a0ec254cedde7c26a71640409a224408b56fb219 100644 (file)
@@ -1070,7 +1070,7 @@ static u8 hwctl = 0;
 
 static void upmnand_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-    struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd->priv;
 
        if (ctrl & NAND_CTRL_CHANGE) {
                if ( ctrl & NAND_CLE )
index 47d5d4b0d7303c24a9ed97baa52db787081feb12..09bcbb233d2bde6289b5c781def86eb14af9fe53 100644 (file)
@@ -553,7 +553,7 @@ int board_nand_init(struct nand_chip *nand)
        nand->write_buf = dfc_write_buf;
 
        nand->cmdfunc = dfc_cmdfunc;
-//     nand->autooob = &delta_oob;
+/*     nand->autooob = &delta_oob; */
        nand->badblock_pattern = &delta_bbt_descr;
        return 0;
 }
index f825234a7c839df1da2fe07bf2a0707a8667c5ba..339d82b5da522753256bd03951547a01c231b772 100644 (file)
@@ -35,7 +35,7 @@
 int mtdparts_init(void);
 int id_parse(const char *id, const char **ret_id, u8 *dev_type, u8 *dev_num);
 int find_dev_and_part(const char *id, struct mtd_device **dev,
-        u8 *part_num, struct part_info **part);
+                      u8 *part_num, struct part_info **part);
 #endif
 
 static int nand_dump_oob(nand_info_t *nand, ulong off)
@@ -340,7 +340,7 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                                opts.length = size;
                                opts.offset = off;
                                opts.quiet = quiet;
-//                             ret = nand_read_opts(nand, &opts);
+/*                             ret = nand_read_opts(nand, &opts); */
                        } else {
                                /* write */
                                mtd_oob_ops_t opts;
@@ -406,44 +406,48 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                }
 
                if (status) {
-//                     ulong block_start = 0;
                        ulong off;
-//                     int last_status = -1;
-
+/*                     ulong block_start = 0;
+                       int last_status = -1;
+*/
                        struct nand_chip *nand_chip = nand->priv;
                        /* check the WP bit */
                        nand_chip->cmdfunc (nand, NAND_CMD_STATUS, -1, -1);
                        printf("device is %swrite protected\n",
                               (nand_chip->read_byte(nand) & 0x80 ?
-                              "NOT " : "" ) );
+                              "NOT " : ""));
 
                        for (off = 0; off < nand->size; off += nand->writesize) {
-//                             int s = nand_get_lock_status(nand, off);
-//
-//                             /* print message only if status has changed
-//                              * or at end of chip
-//                              */
-//                             if (off == nand->size - nand->writesize
-//                                 || (s != last_status && off != 0))  {
-//
-//                                     printf("%08lx - %08lx: %8d pages %s%s%s\n",
-//                                            block_start,
-//                                            off-1,
-//                                            (off-block_start)/nand->writesize,
-//                                            ((last_status & NAND_LOCK_STATUS_TIGHT) ? "TIGHT " : ""),
-//                                            ((last_status & NAND_LOCK_STATUS_LOCK) ? "LOCK " : ""),
-//                                            ((last_status & NAND_LOCK_STATUS_UNLOCK) ? "UNLOCK " : ""));
-//                             }
-//
-//                             last_status = s;
+#if 0  /* must be fixed */
+                               int s = nand_get_lock_status(nand, off);
+
+                               /* print message only if status has changed
+                                * or at end of chip
+                                */
+                               if (off == nand->size - nand->writesize
+                                       || (s != last_status && off != 0))      {
+
+                                       printf("%08lx - %08lx: %8d pages %s%s%s\n",
+                                                  block_start,
+                                                  off-1,
+                                                  (off-block_start)/nand->writesize,
+                                                  ((last_status & NAND_LOCK_STATUS_TIGHT) ? "TIGHT " : ""),
+                                                  ((last_status & NAND_LOCK_STATUS_LOCK) ? "LOCK " : ""),
+                                                  ((last_status & NAND_LOCK_STATUS_UNLOCK) ? "UNLOCK " : ""));
+                               }
+
+                               last_status = s;
+#endif
                        }
                } else {
-//                     if (!nand_lock(nand, tight)) {
-//                             puts("NAND flash successfully locked\n");
-//                     } else {
-//                             puts("Error locking NAND flash\n");
-//                             return 1;
-//                     }
+#if 0  /* must be fixed */
+                       if (!nand_lock(nand, tight)) {
+                               puts("NAND flash successfully locked\n");
+                       } else {
+                               puts("Error locking NAND flash\n");
+                               return 1;
+                       }
+#endif
                }
                return 0;
        }
@@ -452,13 +456,15 @@ int do_nand(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
                if (arg_off_size(argc - 2, argv + 2, nand, &off, &size) < 0)
                        return 1;
 
-//             if (!nand_unlock(nand, off, size)) {
-//                     puts("NAND flash successfully unlocked\n");
-//             } else {
-//                     puts("Error unlocking NAND flash, "
-//                          "write and erase will probably fail\n");
-//                     return 1;
-//             }
+#if 0  /* must be fixed */
+               if (!nand_unlock(nand, off, size)) {
+                       puts("NAND flash successfully unlocked\n");
+               } else {
+                       puts("Error unlocking NAND flash, "
+                                "write and erase will probably fail\n");
+                       return 1;
+               }
+#endif
                return 0;
        }
 
@@ -691,7 +697,7 @@ U_BOOT_CMD(nboot, 4, 1, do_nandboot,
 void archflashwp(void *archdata, int wp);
 #endif
 
-#define ROUND_DOWN(value,boundary)      ((value) & (~((boundary)-1)))
+#define ROUND_DOWN(value,boundary)       ((value) & (~((boundary)-1)))
 
 #undef  NAND_DEBUG
 #undef  PSYCHO_DEBUG
@@ -715,9 +721,9 @@ void archflashwp(void *archdata, int wp);
 #define CONFIG_MTD_NAND_ECC_JFFS2
 
 /* bits for nand_legacy_rw() `cmd'; or together as needed */
-#define NANDRW_READ 0x01
-#define NANDRW_WRITE    0x00
-#define NANDRW_JFFS2    0x02
+#define NANDRW_READ         0x01
+#define NANDRW_WRITE        0x00
+#define NANDRW_JFFS2       0x02
 #define NANDRW_JFFS2_SKIP   0x04
 
 /*
@@ -726,15 +732,15 @@ void archflashwp(void *archdata, int wp);
 extern struct nand_chip nand_dev_desc[CFG_MAX_NAND_DEVICE];
 extern int curr_device;
 extern int nand_legacy_erase(struct nand_chip *nand, size_t ofs,
-                size_t len, int clean);
+                               size_t len, int clean);
 extern int nand_legacy_rw(struct nand_chip *nand, int cmd, size_t start,
-             size_t len, size_t *retlen, u_char *buf);
+                        size_t len, size_t *retlen, u_char *buf);
 extern void nand_print(struct nand_chip *nand);
 extern void nand_print_bad(struct nand_chip *nand);
 extern int nand_read_oob(struct nand_chip *nand, size_t ofs,
-                   size_t len, size_t *retlen, u_char *buf);
+                                  size_t len, size_t *retlen, u_char *buf);
 extern int nand_write_oob(struct nand_chip *nand, size_t ofs,
-                size_t len, size_t *retlen, const u_char *buf);
+                               size_t len, size_t *retlen, const u_char *buf);
 
 
 int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
@@ -828,11 +834,11 @@ int do_nand (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
 
                if (strncmp (argv[1], "read", 4) == 0 ||
                    strncmp (argv[1], "write", 5) == 0) {
-                       ulong   addr = simple_strtoul (argv[2], NULL, 16);
-                       off_t   off  = simple_strtoul (argv[3], NULL, 16);
-                       size_t  size = simple_strtoul (argv[4], NULL, 16);
-                       int     cmd = (strncmp (argv[1], "read", 4) == 0) ?
-                                       NANDRW_READ : NANDRW_WRITE;
+                       ulong addr = simple_strtoul (argv[2], NULL, 16);
+                       off_t off = simple_strtoul (argv[3], NULL, 16);
+                       size_t size = simple_strtoul (argv[4], NULL, 16);
+                       int cmd = (strncmp (argv[1], "read", 4) == 0) ?
+                                 NANDRW_READ : NANDRW_WRITE;
                        size_t total;
                        int ret;
                        char *cmdtail = strchr (argv[1], '.');
@@ -923,9 +929,9 @@ U_BOOT_CMD(
        "nand device [dev] - show or set current device\n"
        "nand read[.jffs2[s]]  addr off size\n"
        "nand write[.jffs2] addr off size - read/write `size' bytes starting\n"
-       "    at offset `off' to/from memory address `addr'\n"
+       "       at offset `off' to/from memory address `addr'\n"
        "nand erase [clean] [off size] - erase `size' bytes from\n"
-       "    offset `off' (entire device if not specified)\n"
+       "       offset `off' (entire device if not specified)\n"
        "nand bad - show bad blocks\n"
        "nand read.oob addr off size - read out-of-band data\n"
        "nand write.oob addr off size - read out-of-band data\n"
index 196fc146b38f8c3ac7b5f2a3b2be2fefa1cbc2d7..6afd4d252e7b05b7e472e50b92fe9cbc86d1dcc8 100644 (file)
@@ -68,7 +68,7 @@ static void nand_davinci_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int c
                this->IO_ADDR_W = (void __iomem *) IO_ADDR_W;
        }
 
-    if (cmd != NAND_CMD_NONE)
+       if (cmd != NAND_CMD_NONE)
                writeb(cmd, this->IO_ADDR_W);
 }
 
@@ -363,22 +363,22 @@ int board_nand_init(struct nand_chip *nand)
 #endif
 #ifdef CFG_NAND_HW_ECC
 #ifdef CFG_NAND_LARGEPAGE
-       nand->ecc.mode     = NAND_ECC_HW;
-    nand->ecc.size = 2048;
-    nand->ecc.bytes = 12;
+       nand->ecc.mode = NAND_ECC_HW;
+       nand->ecc.size = 2048;
+       nand->ecc.bytes = 12;
 #elif defined(CFG_NAND_SMALLPAGE)
-       nand->ecc.mode     = NAND_ECC_HW;
-    nand->ecc.size = 512;
-    nand->ecc.bytes = 3;
+       nand->ecc.mode = NAND_ECC_HW;
+       nand->ecc.size = 512;
+       nand->ecc.bytes = 3;
 #else
 #error "Either CFG_NAND_LARGEPAGE or CFG_NAND_SMALLPAGE must be defined!"
 #endif
-//     nand->autooob     = &davinci_nand_oobinfo;
+/*     nand->autooob     = &davinci_nand_oobinfo; */
        nand->ecc.calculate = nand_davinci_calculate_ecc;
        nand->ecc.correct  = nand_davinci_correct_data;
        nand->ecc.hwctl  = nand_davinci_enable_hwecc;
 #else
-       nand->ecc.mode     = NAND_ECC_SOFT;
+       nand->ecc.mode = NAND_ECC_SOFT;
 #endif
 
        /* Set address of hardware control function */
index 7818eb9c54b583f8848c1009ca74132824eacdb0..86548293152022c861c8528dbb51e9a00516b6ba 100644 (file)
@@ -48,7 +48,7 @@ static u8 hwctl = 0;
 
 static void ndfc_hwcontrol(struct mtd_info *mtd, int cmd, unsigned int ctrl)
 {
-    struct nand_chip *this = mtd->priv;
+       struct nand_chip *this = mtd->priv;
 
        if (ctrl & NAND_CTRL_CHANGE) {
                if ( ctrl & NAND_CLE )
@@ -183,12 +183,12 @@ int board_nand_init(struct nand_chip *nand)
        nand->read_buf   = ndfc_read_buf;
        nand->dev_ready  = ndfc_dev_ready;
 
-    nand->ecc.correct = nand_correct_data;
-    nand->ecc.hwctl = ndfc_enable_hwecc;
-    nand->ecc.calculate = ndfc_calculate_ecc;
-    nand->ecc.mode = NAND_ECC_HW;
-    nand->ecc.size = 256;
-    nand->ecc.bytes = 3;
+       nand->ecc.correct = nand_correct_data;
+       nand->ecc.hwctl = ndfc_enable_hwecc;
+       nand->ecc.calculate = ndfc_calculate_ecc;
+       nand->ecc.mode = NAND_ECC_HW;
+       nand->ecc.size = 256;
+       nand->ecc.bytes = 3;
 
 #ifndef CONFIG_NAND_SPL
        nand->write_buf  = ndfc_write_buf;
index a03f982be5f47fa1e33d23cfb9371a68f80a36df..ce197f5ad1632183180ed8722df65bd7aebbdf93 100644 (file)
@@ -500,11 +500,11 @@ static u_char doc2001_read_byte(struct mtd_info *mtd)
        struct doc_priv *doc = this->priv;
        void __iomem *docptr = doc->virtadr;
 
-       //ReadDOC(docptr, CDSNSlowIO);
+       /*ReadDOC(docptr, CDSNSlowIO); */
        /* 11.4.5 -- delay twice to allow extended length cycle */
        DoC_Delay(doc, 2);
        ReadDOC(docptr, ReadPipeInit);
-       //return ReadDOC(docptr, Mil_CDSN_IO);
+       /*return ReadDOC(docptr, Mil_CDSN_IO); */
        return ReadDOC(docptr, LastDataRead);
 }
 
@@ -1051,7 +1051,7 @@ static int doc200x_correct_data(struct mtd_info *mtd, u_char *dat,
        return ret;
 }
 
-//u_char mydatabuf[528];
+/*u_char mydatabuf[528]; */
 
 /* The strange out-of-order .oobfree list below is a (possibly unneeded)
  * attempt to retain compatibility.  It used to read:
@@ -1623,11 +1623,11 @@ static int __init doc_probe(unsigned long physadr)
                if (ChipID == DOC_ChipID_DocMilPlus16) {
                        WriteDOC(~newval, virtadr, Mplus_AliasResolution);
                        oldval = ReadDOC(doc->virtadr, Mplus_AliasResolution);
-                       WriteDOC(newval, virtadr, Mplus_AliasResolution);       // restore it
+                       WriteDOC(newval, virtadr, Mplus_AliasResolution);       /* restore it */
                } else {
                        WriteDOC(~newval, virtadr, AliasResolution);
                        oldval = ReadDOC(doc->virtadr, AliasResolution);
-                       WriteDOC(newval, virtadr, AliasResolution);     // restore it
+                       WriteDOC(newval, virtadr, AliasResolution);     /* restore it */
                }
                newval = ~newval;
                if (oldval == newval) {
index e21a18baa4a2faa0ddb67cb0ae4a3a45aab12eb6..4b1c564f7509d4c83e6f520180e0b7f25631930c 100644 (file)
@@ -2557,7 +2557,7 @@ int nand_scan_tail(struct mtd_info *mtd)
                default:
                        printk(KERN_WARNING "No oob scheme defined for "
                               "oobsize %d\n", mtd->oobsize);
-//                     BUG();
+/*                     BUG(); */
                }
        }
 
index 86a6e43ca9a323d554e01bcdddea4bbb365583c5..9036b74f86e24045b70829de2f03b2e4083a96cc 100644 (file)
 #define KERN_DEBUG
 
 #define kmalloc(size, flags)   malloc(size)
-#define kzalloc(size, flags)    calloc(size, 1)
+#define kzalloc(size, flags)   calloc(size, 1)
 #define vmalloc(size)                  malloc(size)
-#define kfree(ptr)                     free(ptr)
-#define vfree(ptr)              free(ptr)
+#define kfree(ptr)                             free(ptr)
+#define vfree(ptr)                             free(ptr)
 
 #define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))
 
index 2984f5f282f6b1d661ae71267d504263aa84ac83..f9b7d36a73a027df6abbc768418d7b760ef1badd 100644 (file)
@@ -236,11 +236,12 @@ struct nand_chip;
  *                      used instead of the per chip wait queue when a hw controller is available
  */
 struct nand_hw_control {
+/* XXX U-BOOT XXX */
 #if 0
-    spinlock_t  lock;
-    wait_queue_head_t wq;
+       spinlock_t       lock;
+       wait_queue_head_t wq;
 #endif
-    struct nand_chip *active;
+       struct nand_chip *active;
 };
 
 /**