Skip to content

Commit

Permalink
[MTD] Use SEEK_{SET,CUR,END} instead of hardcoded values in mtdchar l…
Browse files Browse the repository at this point in the history
…seek()

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
  • Loading branch information
Josef 'Jeff' Sipek authored and David Woodhouse committed Sep 17, 2006
1 parent de591da commit ea59830
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions drivers/mtd/mtdchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit ea59830

Please sign in to comment.