Commit 5a28c873 authored by Axel Lin's avatar Axel Lin Committed by Greg Kroah-Hartman

IIO: industrialio-core: Use simple_open

Use simple_open to replace iio_debugfs_open.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Acked-by: default avatarMichael Hennerich <michael.hennerich@analog.com>
Acked-by: default avatarJonathan Cameron <jic23@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 390beae4
...@@ -152,14 +152,6 @@ static void __exit iio_exit(void) ...@@ -152,14 +152,6 @@ static void __exit iio_exit(void)
} }
#if defined(CONFIG_DEBUG_FS) #if defined(CONFIG_DEBUG_FS)
static int iio_debugfs_open(struct inode *inode, struct file *file)
{
if (inode->i_private)
file->private_data = inode->i_private;
return 0;
}
static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf, static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
...@@ -218,7 +210,7 @@ static ssize_t iio_debugfs_write_reg(struct file *file, ...@@ -218,7 +210,7 @@ static ssize_t iio_debugfs_write_reg(struct file *file,
} }
static const struct file_operations iio_debugfs_reg_fops = { static const struct file_operations iio_debugfs_reg_fops = {
.open = iio_debugfs_open, .open = simple_open,
.read = iio_debugfs_read_reg, .read = iio_debugfs_read_reg,
.write = iio_debugfs_write_reg, .write = iio_debugfs_write_reg,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment