]> err.no Git - linux-2.6/blobdiff - arch/i386/kernel/msr.c
[PATCH] mark struct file_operations const 9
[linux-2.6] / arch / i386 / kernel / msr.c
index 1d1a56cae34064755c1e6b78148ba780dba307f2..4e14264f392a93678ad9a0ef906f6d3a4def45bd 100644 (file)
@@ -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))
@@ -230,7 +230,7 @@ static int msr_open(struct inode *inode, struct file *file)
 /*
  * File operations we support
  */
-static struct file_operations msr_fops = {
+static const struct file_operations msr_fops = {
        .owner = THIS_MODULE,
        .llseek = msr_seek,
        .read = msr_read,