lkml.org 
[lkml]   [2017]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] video/mbx: use simple_open()
Date

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

\
 
 \ /
  Last update: 2017-01-30 17:24    [W:0.056 / U:0.544 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site