* [1/4] dmaengine: amba-pl08x: convert to DEFINE_SHOW_ATTRIBUTE
@ 2018-12-05 16:18 Yangtao Li
0 siblings, 0 replies; 2+ messages in thread
From: Yangtao Li @ 2018-12-05 16:18 UTC (permalink / raw)
To: vkoul, dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
haojian.zhuang, robert.jarzmik, okaya, andy.gross, david.brown
Cc: dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm,
Yangtao Li
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/dma/amba-pl08x.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index 97483df1f82e..fc8c2bab563c 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -2505,24 +2505,14 @@ static int pl08x_debugfs_show(struct seq_file *s, void *data)
return 0;
}
-static int pl08x_debugfs_open(struct inode *inode, struct file *file)
-{
- return single_open(file, pl08x_debugfs_show, inode->i_private);
-}
-
-static const struct file_operations pl08x_debugfs_operations = {
- .open = pl08x_debugfs_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(pl08x_debugfs);
static void init_pl08x_debugfs(struct pl08x_driver_data *pl08x)
{
/* Expose a simple debugfs interface to view all clocks */
(void) debugfs_create_file(dev_name(&pl08x->adev->dev),
S_IFREG | S_IRUGO, NULL, pl08x,
- &pl08x_debugfs_operations);
+ &pl08x_debugfs_fops);
}
#else
^ permalink raw reply related [flat|nested] 2+ messages in thread* [1/4] dmaengine: amba-pl08x: convert to DEFINE_SHOW_ATTRIBUTE
@ 2018-12-17 6:19 Vinod Koul
0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2018-12-17 6:19 UTC (permalink / raw)
To: Yangtao Li
Cc: dan.j.williams, sudeep.dutt, ashutosh.dixit, daniel,
haojian.zhuang, robert.jarzmik, okaya, andy.gross, david.brown,
dmaengine, linux-kernel, linux-arm-kernel, linux-arm-msm
On 05-12-18, 11:18, Yangtao Li wrote:
> Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Applied all 4, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-17 6:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-05 16:18 [1/4] dmaengine: amba-pl08x: convert to DEFINE_SHOW_ATTRIBUTE Yangtao Li
-- strict thread matches above, loose matches on Subject: below --
2018-12-17 6:19 Vinod Koul
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).