Use simple_open to replace iio_debugfs_open.
Signed-off-by: Axel Lin <[email protected]>
---
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 72e33b8..52aa44a 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,
};
--
1.7.5.4
Axel Lin wrote on 2012-05-03:
> Use simple_open to replace iio_debugfs_open.
>
> Signed-off-by: Axel Lin <[email protected]>
Acked-by: Michael Hennerich <[email protected]>
> ---
> 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 72e33b8..52aa44a 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,
> };
Greetings,
Michael
--
Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif
????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m????????????I?
On 5/3/2012 7:49 AM, Hennerich, Michael wrote:
> Axel Lin wrote on 2012-05-03:
>> Use simple_open to replace iio_debugfs_open.
>>
>> Signed-off-by: Axel Lin<[email protected]>
> Acked-by: Michael Hennerich<[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
>> ---
>> 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 72e33b8..52aa44a 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,
>> };
> Greetings,
> Michael
>
> --
> Analog Devices GmbH Wilhelm-Wagenfeld-Str. 6 80807 Muenchen
> Sitz der Gesellschaft: Muenchen; Registergericht: Muenchen HRB 40368;
> Geschaeftsfuehrer:Dr.Carsten Suckrow, Thomas Wessel, William A. Martin, Margaret Seif
>
>