Use DEFINE_SEQ_ATTRIBUTE to simplify code.
No functional change.
Signed-off-by: Liu Shixin <[email protected]>
---
kernel/sched/debug.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c
index 6331aa4a4a14..83bf19a81bf0 100644
--- a/kernel/sched/debug.c
+++ b/kernel/sched/debug.c
@@ -246,17 +246,7 @@ __read_mostly bool sched_debug_verbose;
static const struct seq_operations sched_debug_sops;
-static int sched_debug_open(struct inode *inode, struct file *filp)
-{
- return seq_open(filp, &sched_debug_sops);
-}
-
-static const struct file_operations sched_debug_fops = {
- .open = sched_debug_open,
- .read = seq_read,
- .llseek = seq_lseek,
- .release = seq_release,
-};
+DEFINE_SEQ_ATTRIBUTE(sched_debug);
static struct dentry *debugfs_sched;
--
2.25.1