|
@@ -172,7 +172,7 @@ static ssize_t msr_read(struct file *file, char __user * buf,
|
|
|
u32 __user *tmp = (u32 __user *) buf;
|
|
|
u32 data[2];
|
|
|
u32 reg = *ppos;
|
|
|
- int cpu = iminor(file->f_dentry->d_inode);
|
|
|
+ int cpu = iminor(file->f_path.dentry->d_inode);
|
|
|
int err;
|
|
|
|
|
|
if (count % 8)
|
|
@@ -196,7 +196,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
|
|
|
const u32 __user *tmp = (const u32 __user *)buf;
|
|
|
u32 data[2];
|
|
|
u32 reg = *ppos;
|
|
|
- int cpu = iminor(file->f_dentry->d_inode);
|
|
|
+ int cpu = iminor(file->f_path.dentry->d_inode);
|
|
|
int err;
|
|
|
|
|
|
if (count % 8)
|
|
@@ -216,7 +216,7 @@ static ssize_t msr_write(struct file *file, const char __user *buf,
|
|
|
|
|
|
static int msr_open(struct inode *inode, struct file *file)
|
|
|
{
|
|
|
- unsigned int cpu = iminor(file->f_dentry->d_inode);
|
|
|
+ unsigned int cpu = iminor(file->f_path.dentry->d_inode);
|
|
|
struct cpuinfo_x86 *c = &(cpu_data)[cpu];
|
|
|
|
|
|
if (cpu >= NR_CPUS || !cpu_online(cpu))
|