Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1569872

Re: [PATCH] video/mbx: use simple_open()

From Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Newsgroups linux.kernel
Subject Re: [PATCH] video/mbx: use simple_open()
Date 2017-01-30 17:30 +0100
Message-ID <t5n06-6b0-9@gated-at.bofh.it> (permalink)
References <t1Imu-8mw-23@gated-at.bofh.it> <t5n06-6b0-11@gated-at.bofh.it> <t1Imu-8mw-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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,
>  };

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

[PATCH] video/mbx: use simple_open() Geliang Tang <geliangtang@gmail.com> - 2017-01-20 15:30 +0100
  Re: [PATCH] video/mbx: use simple_open() Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> - 2017-01-30 17:30 +0100

csiph-web