Skip to content

Commit

Permalink
NTB: use simple_open for debugfs
Browse files Browse the repository at this point in the history
Use simple_open for debugfs instead of recreating it in the NTB driver.
Caught by coccicheck.

Signed-off-by: Jon Mason <jon.mason@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Jon Mason authored and Greg Kroah-Hartman committed Jan 20, 2013
1 parent 7b4f2d3 commit d66d7ac
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions drivers/ntb/ntb_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,6 @@ void ntb_unregister_client(struct ntb_client *drv)
}
EXPORT_SYMBOL_GPL(ntb_unregister_client);

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

static ssize_t debugfs_read(struct file *filp, char __user *ubuf, size_t count,
loff_t *offp)
{
Expand Down Expand Up @@ -425,7 +419,7 @@ static ssize_t debugfs_read(struct file *filp, char __user *ubuf, size_t count,

static const struct file_operations ntb_qp_debugfs_stats = {
.owner = THIS_MODULE,
.open = debugfs_open,
.open = simple_open,
.read = debugfs_read,
};

Expand Down

0 comments on commit d66d7ac

Please sign in to comment.