diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2013-02-25 21:19:59 -0500 |
---|---|---|
committer | Matt Fleming <matt.fleming@intel.com> | 2013-03-01 08:59:56 -0500 |
commit | 073093819d6d9f363060d3f7584ca1ff987081c4 (patch) | |
tree | c30a43993bcd849b0a9daf8f27f6452f69767570 | |
parent | 6b59e366e074d3962e04f01efb8acc10a33c0e1e (diff) |
efivarfs: convert to use simple_open()
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>
Cc: Jeremy Kerr <jk@ozlabs.org>
Cc: Matthew Garret <mjg59@srcf.ucam.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
-rw-r--r-- | drivers/firmware/efivars.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/firmware/efivars.c b/drivers/firmware/efivars.c index 8bcb5958f21a..dd4e0ae12d89 100644 --- a/drivers/firmware/efivars.c +++ b/drivers/firmware/efivars.c | |||
@@ -648,12 +648,6 @@ efivar_unregister(struct efivar_entry *var) | |||
648 | kobject_put(&var->kobj); | 648 | kobject_put(&var->kobj); |
649 | } | 649 | } |
650 | 650 | ||
651 | static int efivarfs_file_open(struct inode *inode, struct file *file) | ||
652 | { | ||
653 | file->private_data = inode->i_private; | ||
654 | return 0; | ||
655 | } | ||
656 | |||
657 | static int efi_status_to_err(efi_status_t status) | 651 | static int efi_status_to_err(efi_status_t status) |
658 | { | 652 | { |
659 | int err; | 653 | int err; |
@@ -872,7 +866,7 @@ static struct super_block *efivarfs_sb; | |||
872 | static const struct inode_operations efivarfs_dir_inode_operations; | 866 | static const struct inode_operations efivarfs_dir_inode_operations; |
873 | 867 | ||
874 | static const struct file_operations efivarfs_file_operations = { | 868 | static const struct file_operations efivarfs_file_operations = { |
875 | .open = efivarfs_file_open, | 869 | .open = simple_open, |
876 | .read = efivarfs_file_read, | 870 | .read = efivarfs_file_read, |
877 | .write = efivarfs_file_write, | 871 | .write = efivarfs_file_write, |
878 | .llseek = no_llseek, | 872 | .llseek = no_llseek, |