From: Seung-Woo Kim Date: Fri, 19 Feb 2021 05:43:43 +0000 (+0900) Subject: Support Linux kernel v5.10 X-Git-Tag: accepted/tizen/6.5/unified/20211028.115728^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_7.0;p=platform%2Fcore%2Fsystem%2Fstability-monitor-kmod-rpi3.git Support Linux kernel v5.10 To support LTS Kernel version v5.10, fix parameter for proc_create(). Change-Id: Ie6c94fdc31000455aae5d7648f7a393cb791e89b Ref: v5.6 commit d56c0d45f0e2 ("proc: decouple proc from VFS with "struct proc_ops"") Signed-off-by: Seung-Woo Kim --- 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) {