mtd: create an mtd_ooblayout_ops struct to ease ECC layout definition
[sfrench/cifs-2.6.git] / drivers / mtd / mtdchar.c
index cd64ab76dd7bb03576ae794b1c0bc2553ada3efc..3fad2c7425b087db5ae32bd112bfb450b6281a07 100644 (file)
@@ -888,7 +888,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
        {
                struct nand_oobinfo oi;
 
-               if (!mtd->ecclayout)
+               if (!mtd->ooblayout)
                        return -EOPNOTSUPP;
 
                ret = get_oobinfo(mtd, &oi);
@@ -982,7 +982,7 @@ static int mtdchar_ioctl(struct file *file, u_int cmd, u_long arg)
        {
                struct nand_ecclayout_user *usrlay;
 
-               if (!mtd->ecclayout)
+               if (!mtd->ooblayout)
                        return -EOPNOTSUPP;
 
                usrlay = kmalloc(sizeof(*usrlay), GFP_KERNEL);