Skip to content

Commit

Permalink
efivarfs: convert to use simple_open()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and Matt Fleming committed Mar 1, 2013
1 parent 6b59e36 commit 0730938
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/firmware/efivars.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,12 +648,6 @@ efivar_unregister(struct efivar_entry *var)
kobject_put(&var->kobj);
}

static int efivarfs_file_open(struct inode *inode, struct file *file)
{
file->private_data = inode->i_private;
return 0;
}

static int efi_status_to_err(efi_status_t status)
{
int err;
Expand Down Expand Up @@ -872,7 +866,7 @@ static struct super_block *efivarfs_sb;
static const struct inode_operations efivarfs_dir_inode_operations;

static const struct file_operations efivarfs_file_operations = {
.open = efivarfs_file_open,
.open = simple_open,
.read = efivarfs_file_read,
.write = efivarfs_file_write,
.llseek = no_llseek,
Expand Down

0 comments on commit 0730938

Please sign in to comment.