staging: xillybus: Use SEEK_* predefined constants
authorEli Billauer <eli.billauer@gmail.com>
Thu, 4 Sep 2014 14:47:41 +0000 (17:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 20:58:18 +0000 (13:58 -0700)
Suggested-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/xillybus/xillybus_core.c

index cacd560dd6d9bc2bfc1ad25bc6010293692360c4..61699fa5127bab30d566224e661edbeb6a116914 100644 (file)
@@ -1720,13 +1720,13 @@ static loff_t xillybus_llseek(struct file *filp, loff_t offset, int whence)
        mutex_lock(&channel->rd_mutex);
 
        switch (whence) {
-       case 0:
+       case SEEK_SET:
                pos = offset;
                break;
-       case 1:
+       case SEEK_CUR:
                pos += offset;
                break;
-       case 2:
+       case SEEK_END:
                pos = offset; /* Going to the end => to the beginning */
                break;
        default: