diff options
author | Liu Shixin <liushixin2@huawei.com> | 2020-09-16 05:50:29 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-09-17 15:11:03 +0300 |
commit | 61f2e77489182b9b0e2fabe875e151fd46d286a1 (patch) | |
tree | c5589df62853c21372fb1196a6d3043120561068 /arch/s390/kernel/diag.c | |
parent | 110a6dbb2eca6b10bf60c61a51063d7fe1e55078 (diff) | |
download | linux-61f2e77489182b9b0e2fabe875e151fd46d286a1.tar.xz |
s390/diag: convert to use DEFINE_SEQ_ATTRIBUTE macro
Use DEFINE_SEQ_ATTRIBUTE macro to simplify the code.
Signed-off-by: Liu Shixin <liushixin2@huawei.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/diag.c')
-rw-r--r-- | arch/s390/kernel/diag.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/arch/s390/kernel/diag.c b/arch/s390/kernel/diag.c index ccba63aaeb47..b8b0cd7b008f 100644 --- a/arch/s390/kernel/diag.c +++ b/arch/s390/kernel/diag.c @@ -104,18 +104,7 @@ static const struct seq_operations show_diag_stat_sops = { .show = show_diag_stat, }; -static int show_diag_stat_open(struct inode *inode, struct file *file) -{ - return seq_open(file, &show_diag_stat_sops); -} - -static const struct file_operations show_diag_stat_fops = { - .open = show_diag_stat_open, - .read = seq_read, - .llseek = seq_lseek, - .release = seq_release, -}; - +DEFINE_SEQ_ATTRIBUTE(show_diag_stat); static int __init show_diag_stat_init(void) { |