Browse Source

[MTD] Reset file position when switching OTP mode

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Nicolas Pitre 20 years ago
parent
commit
81dba48879
1 changed files with 2 additions and 1 deletions
  1. 2 1
      drivers/mtd/mtdchar.c

+ 2 - 1
drivers/mtd/mtdchar.c

@@ -1,5 +1,5 @@
 /*
- * $Id: mtdchar.c,v 1.68 2005/02/08 19:12:50 nico Exp $
+ * $Id: mtdchar.c,v 1.70 2005/04/01 15:36:11 nico Exp $
  *
  * Character-device access to raw MTD devices.
  *
@@ -583,6 +583,7 @@ static int mtd_ioctl(struct inode *inode, struct file *file,
 		case MTD_OTP_OFF:
 			break;
 		}
+		file->f_pos = 0;
 		break;
 	}