x86, msr: Use seek definitions instead of hard-coded values
Replace 0/1 by SEEK_SET/SEEK_CUR. Signed-off-by: Fabian Frederick <fabf@skynet.be> Link: http://lkml.kernel.org/r/1413576120-27147-1-git-send-email-fabf@skynet.be Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
951a18c6fe
commit
03452d27c6
|
@ -52,11 +52,11 @@ static loff_t msr_seek(struct file *file, loff_t offset, int orig)
|
|||
|
||||
mutex_lock(&inode->i_mutex);
|
||||
switch (orig) {
|
||||
case 0:
|
||||
case SEEK_SET:
|
||||
file->f_pos = offset;
|
||||
ret = file->f_pos;
|
||||
break;
|
||||
case 1:
|
||||
case SEEK_CUR:
|
||||
file->f_pos += offset;
|
||||
ret = file->f_pos;
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue