Commit 25079154 authored by Yangtao Li's avatar Yangtao Li Committed by David S. Miller

net: qca_spi: convert to DEFINE_SHOW_ATTRIBUTE

Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code.
Signed-off-by: default avatarYangtao Li <tiny.windzz@gmail.com>
Acked-by: default avatarStefan Wahren <stefan.wahren@i2se.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb0d9c63
......@@ -126,19 +126,7 @@ qcaspi_info_show(struct seq_file *s, void *what)
return 0;
}
static int
qcaspi_info_open(struct inode *inode, struct file *file)
{
return single_open(file, qcaspi_info_show, inode->i_private);
}
static const struct file_operations qcaspi_info_ops = {
.open = qcaspi_info_open,
.read = seq_read,
.llseek = seq_lseek,
.release = single_release,
};
DEFINE_SHOW_ATTRIBUTE(qcaspi_info);
void
qcaspi_init_device_debugfs(struct qcaspi *qca)
......@@ -154,7 +142,7 @@ qcaspi_init_device_debugfs(struct qcaspi *qca)
return;
}
debugfs_create_file("info", S_IFREG | 0444, device_root, qca,
&qcaspi_info_ops);
&qcaspi_info_fops);
}
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