i5100_edac: convert to use simple_open()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 26 Feb 2013 09:18:34 +0000 (17:18 +0800)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 26 Feb 2013 13:06:18 +0000 (10:06 -0300)
This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/edac/i5100_edac.c

index 6ed11b1881b7ccb1f1f873787ebd0188067d2445..1b635178cc44ff31b8ed224560ebdf86851165f0 100644 (file)
@@ -961,14 +961,8 @@ static ssize_t inject_enable_write(struct file *file, const char __user *data,
        return count;
 }
 
-static int inject_enable_open(struct inode *inode, struct file *file)
-{
-       file->private_data = inode->i_private;
-       return 0;
-}
-
 static const struct file_operations i5100_inject_enable_fops = {
-       .open = inject_enable_open,
+       .open = simple_open,
        .write = inject_enable_write,
        .llseek = generic_file_llseek,
 };