summaryrefslogtreecommitdiff
path: root/drivers/s390/block
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/block
parent5b39fc049ce1232a56628408058ae04f353ac705 (diff)
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/block')
-rw-r--r--drivers/s390/block/dasd.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/drivers/s390/block/dasd.c b/drivers/s390/block/dasd.c
index 5e9ebdb0594c..397af07e4d88 100644
--- a/drivers/s390/block/dasd.c
+++ b/drivers/s390/block/dasd.c
@@ -1192,20 +1192,7 @@ static int dasd_hosts_show(struct seq_file *m, void *v)
return rc;
}
-static int dasd_hosts_open(struct inode *inode, struct file *file)
-{
- struct dasd_device *device = inode->i_private;
-
- return single_open(file, dasd_hosts_show, device);
-}
-
-static const struct file_operations dasd_hosts_fops = {
- .owner = THIS_MODULE,
- .open = dasd_hosts_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = single_release,
-};
+DEFINE_SHOW_ATTRIBUTE(dasd_hosts);
static void dasd_hosts_exit(struct dasd_device *device)
{