[MTD] NAND Consolidate oobinfo handling
The info structure for out of band data was copied into the mtd structure. Make it a pointer and remove the ability to set it from userspace. The position of ecc bytes is defined by the hardware and should not be changed by software. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
@ -512,16 +512,10 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
|
||||
break;
|
||||
}
|
||||
|
||||
case MEMSETOOBSEL:
|
||||
{
|
||||
if (copy_from_user(&mtd->oobinfo, argp, sizeof(struct nand_oobinfo)))
|
||||
return -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
||||
case MEMGETOOBSEL:
|
||||
{
|
||||
if (copy_to_user(argp, &(mtd->oobinfo), sizeof(struct nand_oobinfo)))
|
||||
if (copy_to_user(argp, mtd->oobinfo,
|
||||
sizeof(struct nand_oobinfo)))
|
||||
return -EFAULT;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user