diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-05-02 21:50:51 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-05-08 19:04:11 -0400 |
commit | 5a28c87397655cb0d791d04e45bd7cd5691ba0f2 (patch) | |
tree | 60850aac0a2f38e19397d99eeb053ad7353138db /drivers/iio | |
parent | 390beae4f843d4d2c4adfdedc1e3d633f9d3945f (diff) |
IIO: industrialio-core: Use simple_open
Use simple_open to replace iio_debugfs_open.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r-- | drivers/iio/industrialio-core.c | 10 |
1 files changed, 1 insertions, 9 deletions
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) | |||
152 | } | 152 | } |
153 | 153 | ||
154 | #if defined(CONFIG_DEBUG_FS) | 154 | #if defined(CONFIG_DEBUG_FS) |
155 | static int iio_debugfs_open(struct inode *inode, struct file *file) | ||
156 | { | ||
157 | if (inode->i_private) | ||
158 | file->private_data = inode->i_private; | ||
159 | |||
160 | return 0; | ||
161 | } | ||
162 | |||
163 | static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf, | 155 | static ssize_t iio_debugfs_read_reg(struct file *file, char __user *userbuf, |
164 | size_t count, loff_t *ppos) | 156 | size_t count, loff_t *ppos) |
165 | { | 157 | { |
@@ -218,7 +210,7 @@ static ssize_t iio_debugfs_write_reg(struct file *file, | |||
218 | } | 210 | } |
219 | 211 | ||
220 | static const struct file_operations iio_debugfs_reg_fops = { | 212 | static const struct file_operations iio_debugfs_reg_fops = { |
221 | .open = iio_debugfs_open, | 213 | .open = simple_open, |
222 | .read = iio_debugfs_read_reg, | 214 | .read = iio_debugfs_read_reg, |
223 | .write = iio_debugfs_write_reg, | 215 | .write = iio_debugfs_write_reg, |
224 | }; | 216 | }; |