Commit 5c5dc5f8 authored by Qinglang Miao's avatar Qinglang Miao Committed by Rich Felker

sh: intc: Convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: default avatarRich Felker <dalias@libc.org>
parent 7fb0a1a5
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include "internals.h" #include "internals.h"
static int intc_irq_xlate_debug(struct seq_file *m, void *priv) static int intc_irq_xlate_show(struct seq_file *m, void *priv)
{ {
int i; int i;
...@@ -37,17 +37,7 @@ static int intc_irq_xlate_debug(struct seq_file *m, void *priv) ...@@ -37,17 +37,7 @@ static int intc_irq_xlate_debug(struct seq_file *m, void *priv)
return 0; return 0;
} }
static int intc_irq_xlate_open(struct inode *inode, struct file *file) DEFINE_SHOW_ATTRIBUTE(intc_irq_xlate);
{
return single_open(file, intc_irq_xlate_debug, inode->i_private);
}
static const struct file_operations intc_irq_xlate_fops = {
.open = intc_irq_xlate_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
static int __init intc_irq_xlate_init(void) static int __init intc_irq_xlate_init(void)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment