aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/msr.c
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-10-17 16:01:59 -0400
committerH. Peter Anvin <hpa@linux.intel.com>2014-10-17 16:40:55 -0400
commit03452d27c6cd9cebb59a6bb0fb6bd8557916c263 (patch)
tree6130c15c458483d467f04beb06cc4285704e2f93 /arch/x86/kernel/msr.c
parent951a18c6fee5d2f6f5d7b5118776bf787bf9c351 (diff)
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>
Diffstat (limited to 'arch/x86/kernel/msr.c')
-rw-r--r--arch/x86/kernel/msr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 826c8b0cc099..113e70784854 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -52,11 +52,11 @@ static loff_t msr_seek(struct file *file, loff_t offset, int orig)
52 52
53 mutex_lock(&inode->i_mutex); 53 mutex_lock(&inode->i_mutex);
54 switch (orig) { 54 switch (orig) {
55 case 0: 55 case SEEK_SET:
56 file->f_pos = offset; 56 file->f_pos = offset;
57 ret = file->f_pos; 57 ret = file->f_pos;
58 break; 58 break;
59 case 1: 59 case SEEK_CUR:
60 file->f_pos += offset; 60 file->f_pos += offset;
61 ret = file->f_pos; 61 ret = file->f_pos;
62 break; 62 break;