* [PATCH] net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE
@ 2018-12-03 14:26 Yangtao Li
2018-12-03 18:06 ` Stefan Wahren
2018-12-04 1:30 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Yangtao Li @ 2018-12-03 14:26 UTC (permalink / raw)
To: davem, stefan.wahren, joe, michael.heimpold
Cc: 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/ethernet/qualcomm/qca_debug.c | 16 ++--------------
1 file changed, 2 insertions(+), 14 deletions(-)
diff --git a/drivers/net/ethernet/qualcomm/qca_debug.c b/drivers/net/ethernet/qualcomm/qca_debug.c
index a9f1bc013364..264ddc0159ec 100644
--- a/drivers/net/ethernet/qualcomm/qca_debug.c
+++ b/drivers/net/ethernet/qualcomm/qca_debug.c
@@ -125,19 +125,7 @@ qcaspi_info_show(struct seq_file *s, void *what)
return 0;
}
-
-static int
-qcaspi_info_open(struct inode *inode, struct file *file)
-{
- return single_open(file, qcaspi_info_show, inode->i_private);
-}
-
-static const struct file_operations qcaspi_info_ops = {
- .open = qcaspi_info_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(qcaspi_info);
void
qcaspi_init_device_debugfs(struct qcaspi *qca)
@@ -153,7 +141,7 @@ qcaspi_init_device_debugfs(struct qcaspi *qca)
return;
}
debugfs_create_file("info", S_IFREG | 0444, device_root, qca,
- &qcaspi_info_ops);
+ &qcaspi_info_fops);
}
void
--
2.17.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE
2018-12-03 14:26 [PATCH] net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
@ 2018-12-03 18:06 ` Stefan Wahren
2018-12-04 1:30 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Stefan Wahren @ 2018-12-03 18:06 UTC (permalink / raw)
To: Yangtao Li, davem, joe, michael.heimpold; +Cc: netdev, linux-kernel
> Yangtao Li <tiny.windzz@gmail.com> hat am 3. Dezember 2018 um 15:26 geschrieben:
>
>
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Acked-by: Stefan Wahren <stefan.wahren@i2se.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE
2018-12-03 14:26 [PATCH] net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
2018-12-03 18:06 ` Stefan Wahren
@ 2018-12-04 1:30 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-12-04 1:30 UTC (permalink / raw)
To: tiny.windzz; +Cc: stefan.wahren, joe, michael.heimpold, netdev, linux-kernel
From: Yangtao Li <tiny.windzz@gmail.com>
Date: Mon, 3 Dec 2018 09:26:38 -0500
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-12-04 1:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-03 14:26 [PATCH] net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
2018-12-03 18:06 ` Stefan Wahren
2018-12-04 1:30 ` David Miller
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).