staging: xillybus: Use SEEK_* predefined constants
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>
This commit is contained in:
parent
5899005f94
commit
3cbc747946
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue