sh: intc: Convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com> Signed-off-by: Rich Felker <dalias@libc.org>
This commit is contained in:
parent
7fb0a1a5e5
commit
5c5dc5f8dc
@ -16,7 +16,7 @@
|
||||
#include <linux/debugfs.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;
|
||||
|
||||
@ -37,17 +37,7 @@ static int intc_irq_xlate_debug(struct seq_file *m, void *priv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int intc_irq_xlate_open(struct inode *inode, struct file *file)
|
||||
{
|
||||
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,
|
||||
};
|
||||
DEFINE_SHOW_ATTRIBUTE(intc_irq_xlate);
|
||||
|
||||
static int __init intc_irq_xlate_init(void)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user