diff options
-rw-r--r-- | kernel/proc-tsm.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/proc-tsm.c b/kernel/proc-tsm.c index 82ae966..4527160 100644 --- a/kernel/proc-tsm.c +++ b/kernel/proc-tsm.c @@ -233,6 +233,14 @@ static int stability_monitor_open(struct inode *inode, struct file *file) return single_open_size(file, stability_monitor_show, NULL, 8192); } +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) +static const struct proc_ops stability_monitor_fops = { + .proc_open = stability_monitor_open, + .proc_read = seq_read, + .proc_lseek = seq_lseek, + .proc_release = single_release, +}; +#else static const struct file_operations stability_monitor_fops = { .owner = THIS_MODULE, .open = stability_monitor_open, @@ -240,6 +248,7 @@ static const struct file_operations stability_monitor_fops = { .llseek = seq_lseek, .release = single_release, }; +#endif static int __init stability_monitor_init(void) { |