summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJosef 'Jeff' Sipek <jeffpc@josefsipek.net>2006-09-17 03:09:29 +0200
committerDavid Woodhouse <dwmw2@infradead.org>2006-09-17 18:04:23 +0200
commitea59830db01b6b3d6bda9f84e3d272a346115e8e (patch)
tree85fe1044ae7aad2ef75c3afcbe7db388a8d92957 /drivers
parentMTD: Fix bug in fixup_convert_atmel_pri (diff)
downloadlinux-ea59830db01b6b3d6bda9f84e3d272a346115e8e.tar.xz
linux-ea59830db01b6b3d6bda9f84e3d272a346115e8e.zip
[MTD] Use SEEK_{SET,CUR,END} instead of hardcoded values in mtdchar lseek()
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mtd/mtdchar.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c
index fb8b4f7e48d3..5b6acfcb2b88 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: