From: Josef 'Jeff' Sipek Date: Sun, 17 Sep 2006 01:09:29 +0000 (-0400) Subject: [MTD] Use SEEK_{SET,CUR,END} instead of hardcoded values in mtdchar lseek() X-Git-Tag: v2.6.18~4^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ea59830db01b6b3d6bda9f84e3d272a346115e8e;p=linux-2.6 [MTD] Use SEEK_{SET,CUR,END} instead of hardcoded values in mtdchar lseek() Signed-off-by: Josef 'Jeff' Sipek Signed-off-by: David Woodhouse --- diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index fb8b4f7e48..5b6acfcb2b 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c @@ -62,15 +62,12 @@ static loff_t mtd_lseek (struct file *file, loff_t offset, int orig) 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: