[MTD] Use SEEK_{SET, CUR, END} instead of hardcoded values in mtdchar lseek()

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Sun Sep 17 12:59:02 EDT 2006


Commit:     ea59830db01b6b3d6bda9f84e3d272a346115e8e
Parent:     de591dacf3034977b3fb94b61d08240c8b35c39d
commit ea59830db01b6b3d6bda9f84e3d272a346115e8e
Author:     Josef 'Jeff' Sipek <jeffpc at josefsipek.net>
AuthorDate: Sat Sep 16 21:09:29 2006 -0400
Commit:     David Woodhouse <dwmw2 at infradead.org>
CommitDate: Sun Sep 17 17:04:23 2006 +0100

    [MTD] Use SEEK_{SET,CUR,END} instead of hardcoded values in mtdchar lseek()
    
    Signed-off-by: Josef 'Jeff' Sipek <jeffpc at josefsipek.net>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/mtdchar.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index fb8b4f7..5b6acfc 100644
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@ -62,15 +62,12 @@ static loff_t mtd_lseek (struct file *fi
 	struct mtd_info *mtd = mfi->mtd;
 
 	switch (orig) {
-	case 0:
-		/* SEEK_SET */
+	case SEEK_SET:
 		break;
-	case 1:
-		/* SEEK_CUR */
+	case SEEK_CUR:
 		offset += file->f_pos;
 		break;
-	case 2:
-		/* SEEK_END */
+	case SEEK_END:
 		offset += mtd->size;
 		break;
 	default:



More information about the linux-mtd-cvs mailing list