Lines Matching refs:mfi
41 struct mtd_file_info *mfi = file->private_data; in mtdchar_lseek() local
42 return fixed_size_llseek(file, offset, orig, mfi->mtd->size); in mtdchar_lseek()
51 struct mtd_file_info *mfi; in mtdchar_open() local
75 mfi = kzalloc(sizeof(*mfi), GFP_KERNEL); in mtdchar_open()
76 if (!mfi) { in mtdchar_open()
80 mfi->mtd = mtd; in mtdchar_open()
81 file->private_data = mfi; in mtdchar_open()
93 struct mtd_file_info *mfi = file->private_data; in mtdchar_close() local
94 struct mtd_info *mtd = mfi->mtd; in mtdchar_close()
104 kfree(mfi); in mtdchar_close()
130 struct mtd_file_info *mfi = file->private_data; in mtdchar_read() local
131 struct mtd_info *mtd = mfi->mtd; in mtdchar_read()
158 switch (mfi->mode) { in mtdchar_read()
220 struct mtd_file_info *mfi = file->private_data; in mtdchar_write() local
221 struct mtd_info *mtd = mfi->mtd; in mtdchar_write()
252 switch (mfi->mode) { in mtdchar_write()
310 static int otp_select_filemode(struct mtd_file_info *mfi, int mode) in otp_select_filemode() argument
312 struct mtd_info *mtd = mfi->mtd; in otp_select_filemode()
321 mfi->mode = MTD_FILE_MODE_OTP_FACTORY; in otp_select_filemode()
328 mfi->mode = MTD_FILE_MODE_OTP_USER; in otp_select_filemode()
331 mfi->mode = MTD_FILE_MODE_NORMAL; in otp_select_filemode()
345 struct mtd_file_info *mfi = file->private_data; in mtdchar_writeoob() local
359 ops.mode = (mfi->mode == MTD_FILE_MODE_RAW) ? MTD_OPS_RAW : in mtdchar_writeoob()
386 struct mtd_file_info *mfi = file->private_data; in mtdchar_readoob() local
396 ops.mode = (mfi->mode == MTD_FILE_MODE_RAW) ? MTD_OPS_RAW : in mtdchar_readoob()
824 struct mtd_file_info *mfi = file->private_data; in mtdchar_ioctl() local
825 struct mtd_info *mtd = mfi->mtd; in mtdchar_ioctl()
1100 mfi->mode = MTD_FILE_MODE_NORMAL; in mtdchar_ioctl()
1102 ret = otp_select_filemode(mfi, mode); in mtdchar_ioctl()
1115 switch (mfi->mode) { in mtdchar_ioctl()
1144 if (mfi->mode != MTD_FILE_MODE_OTP_USER) in mtdchar_ioctl()
1185 mfi->mode = 0; in mtdchar_ioctl()
1190 ret = otp_select_filemode(mfi, arg); in mtdchar_ioctl()
1196 mfi->mode = arg; in mtdchar_ioctl()
1233 struct mtd_file_info *mfi = file->private_data; in mtdchar_unlocked_ioctl() local
1234 struct mtd_info *mtd = mfi->mtd; in mtdchar_unlocked_ioctl()
1259 struct mtd_file_info *mfi = file->private_data; in mtdchar_compat_ioctl() local
1260 struct mtd_info *mtd = mfi->mtd; in mtdchar_compat_ioctl()
1347 struct mtd_file_info *mfi = file->private_data; in mtdchar_get_unmapped_area() local
1348 struct mtd_info *mtd = mfi->mtd; in mtdchar_get_unmapped_area()
1368 struct mtd_file_info *mfi = file->private_data; in mtdchar_mmap_capabilities() local
1370 return mtd_mmap_capabilities(mfi->mtd); in mtdchar_mmap_capabilities()
1380 struct mtd_file_info *mfi = file->private_data; in mtdchar_mmap() local
1381 struct mtd_info *mtd = mfi->mtd; in mtdchar_mmap()