[MTD] [NAND] fix broken debug messages
[linux-block.git] / drivers / mtd / nand / nand_base.c
index d902370df3e0dddfb208c55066319f90d0fe56dd..0793ca39cc88777c1c95ad75d82e4045d5063e19 100644 (file)
@@ -1946,7 +1946,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
        }
 
        if (unlikely(ops->ooboffs >= len)) {
-               DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+               DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
                        "Attempt to start write outside oob\n");
                return -EINVAL;
        }
@@ -1956,7 +1956,7 @@ static int nand_do_write_oob(struct mtd_info *mtd, loff_t to,
                     ops->ooboffs + ops->ooblen >
                        ((mtd->size >> chip->page_shift) -
                         (to >> chip->page_shift)) * len)) {
-               DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
+               DEBUG(MTD_DEBUG_LEVEL0, "nand_do_write_oob: "
                        "Attempt write beyond end of device\n");
                return -EINVAL;
        }
@@ -2012,8 +2012,8 @@ static int nand_write_oob(struct mtd_info *mtd, loff_t to,
 
        /* Do not allow writes past end of device */
        if (ops->datbuf && (to + ops->len) > mtd->size) {
-               DEBUG(MTD_DEBUG_LEVEL0, "nand_read_oob: "
-                     "Attempt read beyond end of device\n");
+               DEBUG(MTD_DEBUG_LEVEL0, "nand_write_oob: "
+                     "Attempt write beyond end of device\n");
                return -EINVAL;
        }