diff options
Diffstat (limited to 'arch/x86/kernel/cpuid.c')
-rw-r--r-- | arch/x86/kernel/cpuid.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c index 60c78917190c..1e4dbcfe6d31 100644 --- a/arch/x86/kernel/cpuid.c +++ b/arch/x86/kernel/cpuid.c | |||
@@ -85,7 +85,7 @@ static ssize_t cpuid_read(struct file *file, char __user *buf, | |||
85 | { | 85 | { |
86 | char __user *tmp = buf; | 86 | char __user *tmp = buf; |
87 | struct cpuid_regs cmd; | 87 | struct cpuid_regs cmd; |
88 | int cpu = iminor(file->f_path.dentry->d_inode); | 88 | int cpu = iminor(file_inode(file)); |
89 | u64 pos = *ppos; | 89 | u64 pos = *ppos; |
90 | ssize_t bytes = 0; | 90 | ssize_t bytes = 0; |
91 | int err = 0; | 91 | int err = 0; |
@@ -116,7 +116,7 @@ static int cpuid_open(struct inode *inode, struct file *file) | |||
116 | unsigned int cpu; | 116 | unsigned int cpu; |
117 | struct cpuinfo_x86 *c; | 117 | struct cpuinfo_x86 *c; |
118 | 118 | ||
119 | cpu = iminor(file->f_path.dentry->d_inode); | 119 | cpu = iminor(file_inode(file)); |
120 | if (cpu >= nr_cpu_ids || !cpu_online(cpu)) | 120 | if (cpu >= nr_cpu_ids || !cpu_online(cpu)) |
121 | return -ENXIO; /* No such CPU */ | 121 | return -ENXIO; /* No such CPU */ |
122 | 122 | ||