diff mbox

[-next] cw1200: convert to use simple_open()

Message ID CAPgLHd_naHj0Y9EsV_XZHBAiBieutbw=+w2Bgn_o0tAuO5DCkw@mail.gmail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Wei Yongjun May 30, 2013, 11:42 a.m. UTC
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

This removes an open coded simple_open() function and
replaces file operations references to the function
with simple_open() instead.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/net/wireless/cw1200/debug.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)


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

Comments

Solomon Peachy June 1, 2013, 12:02 p.m. UTC | #1
On Thu, May 30, 2013 at 07:42:35PM +0800, Wei Yongjun wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> This removes an open coded simple_open() function and
> replaces file operations references to the function
> with simple_open() instead.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Acked-by: Solomon Peachy <pizza@shaftnet.org>

> ---
>  drivers/net/wireless/cw1200/debug.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/net/wireless/cw1200/debug.c b/drivers/net/wireless/cw1200/debug.c
> index b815181..eb40c9c 100644
> --- a/drivers/net/wireless/cw1200/debug.c
> +++ b/drivers/net/wireless/cw1200/debug.c
> @@ -357,12 +357,6 @@ static const struct file_operations fops_counters = {
>  	.owner = THIS_MODULE,
>  };
>  
> -static int cw1200_generic_open(struct inode *inode, struct file *file)
> -{
> -	file->private_data = inode->i_private;
> -	return 0;
> -}
> -
>  #ifdef CONFIG_CW1200_ETF
>  static int cw1200_etf_out_show(struct seq_file *seq, void *v)
>  {
> @@ -511,7 +505,7 @@ static ssize_t cw1200_wsm_dumps(struct file *file,
>  }
>  
>  static const struct file_operations fops_wsm_dumps = {
> -	.open = cw1200_generic_open,
> +	.open = simple_open,
>  	.write = cw1200_wsm_dumps,
>  	.llseek = default_llseek,
>  };
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" 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/net/wireless/cw1200/debug.c b/drivers/net/wireless/cw1200/debug.c
index b815181..eb40c9c 100644
--- a/drivers/net/wireless/cw1200/debug.c
+++ b/drivers/net/wireless/cw1200/debug.c
@@ -357,12 +357,6 @@  static const struct file_operations fops_counters = {
 	.owner = THIS_MODULE,
 };
 
-static int cw1200_generic_open(struct inode *inode, struct file *file)
-{
-	file->private_data = inode->i_private;
-	return 0;
-}
-
 #ifdef CONFIG_CW1200_ETF
 static int cw1200_etf_out_show(struct seq_file *seq, void *v)
 {
@@ -511,7 +505,7 @@  static ssize_t cw1200_wsm_dumps(struct file *file,
 }
 
 static const struct file_operations fops_wsm_dumps = {
-	.open = cw1200_generic_open,
+	.open = simple_open,
 	.write = cw1200_wsm_dumps,
 	.llseek = default_llseek,
 };