From: Axel Lin Date: Thu, 3 May 2012 01:50:51 +0000 (+0800) Subject: IIO: industrialio-core: Use simple_open X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5a28c87397655cb0d791d04e45bd7cd5691ba0f2;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git IIO: industrialio-core: Use simple_open Use simple_open to replace iio_debugfs_open. Signed-off-by: Axel Lin Acked-by: Michael Hennerich Acked-by: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index 72e33b819f91..52aa44a8e209 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -152,14 +152,6 @@ static void __exit iio_exit(void) } #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, size_t count, loff_t *ppos) { @@ -218,7 +210,7 @@ static ssize_t iio_debugfs_write_reg(struct file *file, } static const struct file_operations iio_debugfs_reg_fops = { - .open = iio_debugfs_open, + .open = simple_open, .read = iio_debugfs_read_reg, .write = iio_debugfs_write_reg, };