Skip to content

Commit 5c5dc5f

Browse files
Qinglang MiaoRich Felker
authored andcommitted
sh: intc: Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao <[email protected]> Signed-off-by: Rich Felker <[email protected]>
1 parent 7fb0a1a commit 5c5dc5f

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

drivers/sh/intc/virq-debugfs.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <linux/debugfs.h>
1717
#include "internals.h"
1818

19-
static int intc_irq_xlate_debug(struct seq_file *m, void *priv)
19+
static int intc_irq_xlate_show(struct seq_file *m, void *priv)
2020
{
2121
int i;
2222

@@ -37,17 +37,7 @@ static int intc_irq_xlate_debug(struct seq_file *m, void *priv)
3737
return 0;
3838
}
3939

40-
static int intc_irq_xlate_open(struct inode *inode, struct file *file)
41-
{
42-
return single_open(file, intc_irq_xlate_debug, inode->i_private);
43-
}
44-
45-
static const struct file_operations intc_irq_xlate_fops = {
46-
.open = intc_irq_xlate_open,
47-
.read = seq_read,
48-
.llseek = seq_lseek,
49-
.release = single_release,
50-
};
40+
DEFINE_SHOW_ATTRIBUTE(intc_irq_xlate);
5141

5242
static int __init intc_irq_xlate_init(void)
5343
{

0 commit comments

Comments
 (0)