Skip to content

Commit

Permalink
[PATCH] MBCS: Use SEEK_{SET, CUR, END} instead of hardcoded values
Browse files Browse the repository at this point in the history
MBCS: Use SEEK_{SET,CUR,END} instead of hardcoded values

Signed-off-by: Josef 'Jeff' Sipek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jeffpc authored and Linus Torvalds committed Oct 1, 2006
1 parent edceeaf commit 930ff81
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/char/mbcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/uio.h>
#include <asm/io.h>
#include <asm/uaccess.h>
Expand Down Expand Up @@ -447,15 +448,15 @@ loff_t mbcs_sram_llseek(struct file * filp, loff_t off, int whence)
loff_t newpos;

switch (whence) {
case 0: /* SEEK_SET */
case SEEK_SET:
newpos = off;
break;

case 1: /* SEEK_CUR */
case SEEK_CUR:
newpos = filp->f_pos + off;
break;

case 2: /* SEEK_END */
case SEEK_END:
newpos = MBCS_SRAM_SIZE + off;
break;

Expand Down

0 comments on commit 930ff81

Please sign in to comment.