Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [PATCH] MIPS: math-emu: Change to use DEFINE_SHOW_ATTRIBUTE macro
@ 2018-11-05 14:50 Yangtao Li
  2018-11-05 18:15 ` Paul Burton
  0 siblings, 1 reply; 2+ messages in thread
From: Yangtao Li @ 2018-11-05 14:50 UTC (permalink / raw)
  To: ralf, paul.burton, jhogan; +Cc: linux-mips, linux-kernel, Yangtao Li

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 arch/mips/math-emu/me-debugfs.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/arch/mips/math-emu/me-debugfs.c b/arch/mips/math-emu/me-debugfs.c
index 62566385ce0e..58798f527356 100644
--- a/arch/mips/math-emu/me-debugfs.c
+++ b/arch/mips/math-emu/me-debugfs.c
@@ -183,17 +183,7 @@ static int fpuemustats_clear_show(struct seq_file *s, void *unused)
 	return 0;
 }
 
-static int fpuemustats_clear_open(struct inode *inode, struct file *file)
-{
-	return single_open(file, fpuemustats_clear_show, inode->i_private);
-}
-
-static const struct file_operations fpuemustats_clear_fops = {
-	.open                   = fpuemustats_clear_open,
-	.read			= seq_read,
-	.llseek			= seq_lseek,
-	.release		= single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(fpuemustats_clear);
 
 static int __init debugfs_fpuemu(void)
 {
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-11-05 18:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-05 14:50 [PATCH] MIPS: math-emu: Change to use DEFINE_SHOW_ATTRIBUTE macro Yangtao Li
2018-11-05 18:15 ` Paul Burton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox