diff mbox

video/mbx: use simple_open()

Message ID 70f5253031d545642db17d64535f228752c12e6e.1484903730.git.geliangtang@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Geliang Tang Jan. 20, 2017, 2:27 p.m. UTC
Drop open_file_generic(), use simple_open() instead of it.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/video/fbdev/mbx/mbxdebugfs.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

Comments

Bartlomiej Zolnierkiewicz Jan. 30, 2017, 4:22 p.m. UTC | #1
Hi,

On Friday, January 20, 2017 10:27:05 PM Geliang Tang wrote:
> Drop open_file_generic(), use simple_open() instead of it.
> 
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>

Thanks, patch queued for 4.11.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/video/fbdev/mbx/mbxdebugfs.c | 18 ++++++------------
>  1 file changed, 6 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/video/fbdev/mbx/mbxdebugfs.c b/drivers/video/fbdev/mbx/mbxdebugfs.c
> index e3bc00a..2528d3e 100644
> --- a/drivers/video/fbdev/mbx/mbxdebugfs.c
> +++ b/drivers/video/fbdev/mbx/mbxdebugfs.c
> @@ -15,12 +15,6 @@ struct mbxfb_debugfs_data {
>  	struct dentry *misc;
>  };
>  
> -static int open_file_generic(struct inode *inode, struct file *file)
> -{
> -	file->private_data = inode->i_private;
> -	return 0;
> -}
> -
>  static ssize_t write_file_dummy(struct file *file, const char __user *buf,
>  				size_t count, loff_t *ppos)
>  {
> @@ -174,42 +168,42 @@ static ssize_t misc_read_file(struct file *file, char __user *userbuf,
>  static const struct file_operations sysconf_fops = {
>  	.read = sysconf_read_file,
>  	.write = write_file_dummy,
> -	.open = open_file_generic,
> +	.open = simple_open,
>  	.llseek = default_llseek,
>  };
>  
>  static const struct file_operations clock_fops = {
>  	.read = clock_read_file,
>  	.write = write_file_dummy,
> -	.open = open_file_generic,
> +	.open = simple_open,
>  	.llseek = default_llseek,
>  };
>  
>  static const struct file_operations display_fops = {
>  	.read = display_read_file,
>  	.write = write_file_dummy,
> -	.open = open_file_generic,
> +	.open = simple_open,
>  	.llseek = default_llseek,
>  };
>  
>  static const struct file_operations gsctl_fops = {
>  	.read = gsctl_read_file,
>  	.write = write_file_dummy,
> -	.open = open_file_generic,
> +	.open = simple_open,
>  	.llseek = default_llseek,
>  };
>  
>  static const struct file_operations sdram_fops = {
>  	.read = sdram_read_file,
>  	.write = write_file_dummy,
> -	.open = open_file_generic,
> +	.open = simple_open,
>  	.llseek = default_llseek,
>  };
>  
>  static const struct file_operations misc_fops = {
>  	.read = misc_read_file,
>  	.write = write_file_dummy,
> -	.open = open_file_generic,
> +	.open = simple_open,
>  	.llseek = default_llseek,
>  };

--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/video/fbdev/mbx/mbxdebugfs.c b/drivers/video/fbdev/mbx/mbxdebugfs.c
index e3bc00a..2528d3e 100644
--- a/drivers/video/fbdev/mbx/mbxdebugfs.c
+++ b/drivers/video/fbdev/mbx/mbxdebugfs.c
@@ -15,12 +15,6 @@  struct mbxfb_debugfs_data {
 	struct dentry *misc;
 };
 
-static int open_file_generic(struct inode *inode, struct file *file)
-{
-	file->private_data = inode->i_private;
-	return 0;
-}
-
 static ssize_t write_file_dummy(struct file *file, const char __user *buf,
 				size_t count, loff_t *ppos)
 {
@@ -174,42 +168,42 @@  static ssize_t misc_read_file(struct file *file, char __user *userbuf,
 static const struct file_operations sysconf_fops = {
 	.read = sysconf_read_file,
 	.write = write_file_dummy,
-	.open = open_file_generic,
+	.open = simple_open,
 	.llseek = default_llseek,
 };
 
 static const struct file_operations clock_fops = {
 	.read = clock_read_file,
 	.write = write_file_dummy,
-	.open = open_file_generic,
+	.open = simple_open,
 	.llseek = default_llseek,
 };
 
 static const struct file_operations display_fops = {
 	.read = display_read_file,
 	.write = write_file_dummy,
-	.open = open_file_generic,
+	.open = simple_open,
 	.llseek = default_llseek,
 };
 
 static const struct file_operations gsctl_fops = {
 	.read = gsctl_read_file,
 	.write = write_file_dummy,
-	.open = open_file_generic,
+	.open = simple_open,
 	.llseek = default_llseek,
 };
 
 static const struct file_operations sdram_fops = {
 	.read = sdram_read_file,
 	.write = write_file_dummy,
-	.open = open_file_generic,
+	.open = simple_open,
 	.llseek = default_llseek,
 };
 
 static const struct file_operations misc_fops = {
 	.read = misc_read_file,
 	.write = write_file_dummy,
-	.open = open_file_generic,
+	.open = simple_open,
 	.llseek = default_llseek,
 };