EDAC: Convert to use simple_open()
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Wed, 17 Oct 2012 08:32:01 +0000 (16:32 +0800)
committerBorislav Petkov <bp@alien8.de>
Wed, 28 Nov 2012 10:55:22 +0000 (11:55 +0100)
This removes an open coded simple_open() function and replaces file
operations references to the function with simple_open() instead.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
drivers/edac/edac_mc_sysfs.c

index a242dae1aeb0ef2bc7d1131fdc8f0190dffd7a9c..52813b8b0f5f7fabe372937a1d4ffe8c0e6f7b3e 100644 (file)
@@ -846,14 +846,8 @@ static ssize_t edac_fake_inject_write(struct file *file,
        return count;
 }
 
-static int debugfs_open(struct inode *inode, struct file *file)
-{
-       file->private_data = inode->i_private;
-       return 0;
-}
-
 static const struct file_operations debug_fake_inject_fops = {
-       .open = debugfs_open,
+       .open = simple_open,
        .write = edac_fake_inject_write,
        .llseek = generic_file_llseek,
 };