* [PATCH] IIO: industrialio-core: Use simple_open
@ 2012-05-03 1:50 Axel Lin
2012-05-03 6:49 ` Hennerich, Michael
0 siblings, 1 reply; 3+ messages in thread
From: Axel Lin @ 2012-05-03 1:50 UTC (permalink / raw)
To: linux-kernel; +Cc: Jonathan Cameron, linux-iio, Greg Kroah-Hartman
Use simple_open to replace iio_debugfs_open.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] IIO: industrialio-core: Use simple_open
2012-05-03 1:50 [PATCH] IIO: industrialio-core: Use simple_open Axel Lin
@ 2012-05-03 6:49 ` Hennerich, Michael
2012-05-03 7:27 ` Jonathan Cameron
0 siblings, 1 reply; 3+ messages in thread
From: Hennerich, Michael @ 2012-05-03 6:49 UTC (permalink / raw)
To: Axel Lin, linux-kernel@vger.kernel.org
Cc: Jonathan Cameron, linux-iio@vger.kernel.org, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1609 bytes --]
Axel Lin wrote on 2012-05-03:
> 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>
> ---
> 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Ç+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] IIO: industrialio-core: Use simple_open
2012-05-03 6:49 ` Hennerich, Michael
@ 2012-05-03 7:27 ` Jonathan Cameron
0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2012-05-03 7:27 UTC (permalink / raw)
To: Hennerich, Michael
Cc: Axel Lin, linux-kernel@vger.kernel.org, linux-iio@vger.kernel.org,
Greg Kroah-Hartman
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<axel.lin@gmail.com>
> Acked-by: Michael Hennerich<michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
>> ---
>> 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
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-05-03 7:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 1:50 [PATCH] IIO: industrialio-core: Use simple_open Axel Lin
2012-05-03 6:49 ` Hennerich, Michael
2012-05-03 7:27 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox