summaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio
diff options
context:
space:
mode:
authorYangtao Li <tiny.windzz@gmail.com>2018-12-01 22:28:11 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2018-12-13 10:42:23 +0100
commitca92b93d17f8c546d10ae175430fb22d6bd2d60b (patch)
tree1fe4df086df55f44715e309a105410d7c45e7fde /drivers/s390/cio
parent5b39fc049ce1232a56628408058ae04f353ac705 (diff)
downloadlinux-ca92b93d17f8c546d10ae175430fb22d6bd2d60b.tar.bz2
s390: convert to DEFINE_SHOW_ATTRIBUTE
Use DEFINE_SHOW_ATTRIBUTE macro to simplify the code. Signed-off-by: Yangtao Li <tiny.windzz@gmail.com> Signed-off-by: Sebastian Ott <sebott@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r--drivers/s390/cio/qdio_debug.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/s390/cio/qdio_debug.c b/drivers/s390/cio/qdio_debug.c
index 68a82f3e2e92..040061f2bfff 100644
--- a/drivers/s390/cio/qdio_debug.c
+++ b/drivers/s390/cio/qdio_debug.c
@@ -190,19 +190,7 @@ static int qstat_show(struct seq_file *m, void *v)
return 0;
}
-static int qstat_seq_open(struct inode *inode, struct file *filp)
-{
- return single_open(filp, qstat_show,
- file_inode(filp)->i_private);
-}
-
-static const struct file_operations debugfs_fops = {
- .owner = THIS_MODULE,
- .open = qstat_seq_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(qstat);
static char *qperf_names[] = {
"Assumed adapter interrupts",
@@ -306,7 +294,7 @@ static void setup_debugfs_entry(struct qdio_q *q)
q->is_input_q ? "input" : "output",
q->nr);
q->debugfs_q = debugfs_create_file(name, S_IFREG | S_IRUGO | S_IWUSR,
- q->irq_ptr->debugfs_dev, q, &debugfs_fops);
+ q->irq_ptr->debugfs_dev, q, &qstat_fops);
if (IS_ERR(q->debugfs_q))
q->debugfs_q = NULL;
}