]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/mtd/nand/mxs_nand.c
nand: mxs: convey return code from failed function rather than '0' in mxs_nand_ecc_wr...
[karo-tx-uboot.git] / drivers / mtd / nand / mxs_nand.c
index 43817802239849044e6b866f63dd01c2a9bb160d..d4575fb7c666cc08c13d6d9f52e9544dd0e6f4ac 100644 (file)
@@ -174,7 +174,7 @@ static inline void dump_regs(void)
 }
 #endif
 
-struct nand_ecclayout fake_ecc_layout;
+static struct nand_ecclayout fake_ecc_layout;
 static int chunk_data_size = MXS_NAND_CHUNK_DATA_CHUNK_SIZE;
 static int galois_field = 13;
 
@@ -592,7 +592,7 @@ static void mxs_nand_read_buf(struct mtd_info *mtd, uint8_t *buf, int length)
 
        mxs_dma_desc_append(channel, d);
 
-#ifndef CONFIG_SOC_MX6Q
+#ifndef CONFIG_ARCH_MX6
        /*
         * A DMA descriptor that waits for the command to end and the chip to
         * become ready.
@@ -926,7 +926,7 @@ static int mxs_nand_ecc_write_page(struct mtd_info *mtd,
 
 rtn:
        mxs_nand_return_dma_descs(nand_info);
-       return 0;
+       return ret;
 }
 
 /*