* [PATCH] wireless/cw1200: convert to DEFINE_SHOW_ATTRIBUTE
@ 2018-12-03 13:31 Yangtao Li
2018-12-03 13:38 ` Kalle Valo
2018-12-20 6:46 ` [PATCH] cw1200: " Kalle Valo
0 siblings, 2 replies; 5+ messages in thread
From: Yangtao Li @ 2018-12-03 13:31 UTC (permalink / raw)
To: pizza, kvalo, davem; +Cc: linux-wireless, netdev, linux-kernel, Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/net/wireless/st/cw1200/debug.c | 32 ++++----------------------
1 file changed, 4 insertions(+), 28 deletions(-)
diff --git a/drivers/net/wireless/st/cw1200/debug.c b/drivers/net/wireless/st/cw1200/debug.c
index 295cb1a29f25..2231ba08bc1f 100644
--- a/drivers/net/wireless/st/cw1200/debug.c
+++ b/drivers/net/wireless/st/cw1200/debug.c
@@ -289,19 +289,7 @@ static int cw1200_status_show(struct seq_file *seq, void *v)
return 0;
}
-static int cw1200_status_open(struct inode *inode, struct file *file)
-{
- return single_open(file, &cw1200_status_show,
- inode->i_private);
-}
-
-static const struct file_operations fops_status = {
- .open = cw1200_status_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
- .owner = THIS_MODULE,
-};
+DEFINE_SHOW_ATTRIBUTE(cw1200_status);
static int cw1200_counters_show(struct seq_file *seq, void *v)
{
@@ -345,19 +333,7 @@ static int cw1200_counters_show(struct seq_file *seq, void *v)
return 0;
}
-static int cw1200_counters_open(struct inode *inode, struct file *file)
-{
- return single_open(file, &cw1200_counters_show,
- inode->i_private);
-}
-
-static const struct file_operations fops_counters = {
- .open = cw1200_counters_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
- .owner = THIS_MODULE,
-};
+DEFINE_SHOW_ATTRIBUTE(cw1200_counters);
static ssize_t cw1200_wsm_dumps(struct file *file,
const char __user *user_buf, size_t count, loff_t *ppos)
@@ -399,11 +375,11 @@ int cw1200_debug_init(struct cw1200_common *priv)
goto err;
if (!debugfs_create_file("status", 0400, d->debugfs_phy,
- priv, &fops_status))
+ priv, &cw1200_status_fops))
goto err;
if (!debugfs_create_file("counters", 0400, d->debugfs_phy,
- priv, &fops_counters))
+ priv, &cw1200_counters_fops))
goto err;
if (!debugfs_create_file("wsm_dumps", 0200, d->debugfs_phy,
--
2.17.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] wireless/cw1200: convert to DEFINE_SHOW_ATTRIBUTE
2018-12-03 13:31 [PATCH] wireless/cw1200: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
@ 2018-12-03 13:38 ` Kalle Valo
2018-12-03 13:43 ` Frank Lee
2018-12-20 6:46 ` [PATCH] cw1200: " Kalle Valo
1 sibling, 1 reply; 5+ messages in thread
From: Kalle Valo @ 2018-12-03 13:38 UTC (permalink / raw)
To: Yangtao Li; +Cc: pizza, davem, linux-wireless, netdev, linux-kernel
Yangtao Li <tiny.windzz@gmail.com> writes:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
The prefix should be "cw1200:", I can fix that.
--
Kalle Valo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wireless/cw1200: convert to DEFINE_SHOW_ATTRIBUTE
2018-12-03 13:38 ` Kalle Valo
@ 2018-12-03 13:43 ` Frank Lee
2018-12-11 15:28 ` Frank Lee
0 siblings, 1 reply; 5+ messages in thread
From: Frank Lee @ 2018-12-03 13:43 UTC (permalink / raw)
To: kvalo; +Cc: Solomon Peachy, davem, linux-wireless, netdev, linux-kernel
On Mon, Dec 3, 2018 at 9:38 PM Kalle Valo <kvalo@codeaurora.org> wrote:
>
> Yangtao Li <tiny.windzz@gmail.com> writes:
>
> > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
>
> The prefix should be "cw1200:", I can fix that.
>
> --
> Kalle Valo
OK.
Thanks,
Yangtao
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] wireless/cw1200: convert to DEFINE_SHOW_ATTRIBUTE
2018-12-03 13:43 ` Frank Lee
@ 2018-12-11 15:28 ` Frank Lee
0 siblings, 0 replies; 5+ messages in thread
From: Frank Lee @ 2018-12-11 15:28 UTC (permalink / raw)
To: kvalo; +Cc: Solomon Peachy, davem, linux-wireless, netdev, linux-kernel
On Mon, Dec 3, 2018 at 9:43 PM Frank Lee <tiny.windzz@gmail.com> wrote:
>
> On Mon, Dec 3, 2018 at 9:38 PM Kalle Valo <kvalo@codeaurora.org> wrote:
> >
> > Yangtao Li <tiny.windzz@gmail.com> writes:
> >
> > > Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
> > >
> > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> >
> > The prefix should be "cw1200:", I can fix that.
The same.
Thanks,
Yangtao
> >
> > --
> > Kalle Valo
> OK.
>
> Thanks,
> Yangtao
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] cw1200: convert to DEFINE_SHOW_ATTRIBUTE
2018-12-03 13:31 [PATCH] wireless/cw1200: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
2018-12-03 13:38 ` Kalle Valo
@ 2018-12-20 6:46 ` Kalle Valo
1 sibling, 0 replies; 5+ messages in thread
From: Kalle Valo @ 2018-12-20 6:46 UTC (permalink / raw)
To: Yangtao Li; +Cc: pizza, davem, linux-wireless, netdev, linux-kernel, Yangtao Li
Yangtao Li <tiny.windzz@gmail.com> wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Patch applied to wireless-drivers-next.git, thanks.
cc4dc97ffc69 cw1200: convert to DEFINE_SHOW_ATTRIBUTE
--
https://patchwork.kernel.org/patch/10709559/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-12-20 6:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03 13:31 [PATCH] wireless/cw1200: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
2018-12-03 13:38 ` Kalle Valo
2018-12-03 13:43 ` Frank Lee
2018-12-11 15:28 ` Frank Lee
2018-12-20 6:46 ` [PATCH] cw1200: " Kalle Valo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).