Browse Source

[PATCH] MBCS: Use SEEK_{SET, CUR, END} instead of hardcoded values

MBCS: Use SEEK_{SET,CUR,END} instead of hardcoded values

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Josef 'Jeff' Sipek 18 years ago
parent
commit
930ff81c59
1 changed files with 4 additions and 3 deletions
  1. 4 3
      drivers/char/mbcs.c

+ 4 - 3
drivers/char/mbcs.c

@@ -22,6 +22,7 @@
 #include <linux/delay.h>
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/device.h>
 #include <linux/mm.h>
 #include <linux/mm.h>
+#include <linux/fs.h>
 #include <linux/uio.h>
 #include <linux/uio.h>
 #include <asm/io.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/uaccess.h>
@@ -447,15 +448,15 @@ loff_t mbcs_sram_llseek(struct file * filp, loff_t off, int whence)
 	loff_t newpos;
 	loff_t newpos;
 
 
 	switch (whence) {
 	switch (whence) {
-	case 0:		/* SEEK_SET */
+	case SEEK_SET:
 		newpos = off;
 		newpos = off;
 		break;
 		break;
 
 
-	case 1:		/* SEEK_CUR */
+	case SEEK_CUR:
 		newpos = filp->f_pos + off;
 		newpos = filp->f_pos + off;
 		break;
 		break;
 
 
-	case 2:		/* SEEK_END */
+	case SEEK_END:
 		newpos = MBCS_SRAM_SIZE + off;
 		newpos = MBCS_SRAM_SIZE + off;
 		break;
 		break;