Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d66d7ac2 authored by Jon Mason's avatar Jon Mason Committed by Greg Kroah-Hartman
Browse files

NTB: use simple_open for debugfs



Use simple_open for debugfs instead of recreating it in the NTB driver.
Caught by coccicheck.

Signed-off-by: default avatarJon Mason <jon.mason@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7b4f2d3c
Loading
Loading
Loading
Loading
+1 −7
Original line number Original line Diff line number Diff line
@@ -364,12 +364,6 @@ void ntb_unregister_client(struct ntb_client *drv)
}
}
EXPORT_SYMBOL_GPL(ntb_unregister_client);
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,
static ssize_t debugfs_read(struct file *filp, char __user *ubuf, size_t count,
			    loff_t *offp)
			    loff_t *offp)
{
{
@@ -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 = {
static const struct file_operations ntb_qp_debugfs_stats = {
	.owner = THIS_MODULE,
	.owner = THIS_MODULE,
	.open = debugfs_open,
	.open = simple_open,
	.read = debugfs_read,
	.read = debugfs_read,
};
};