Support Linux kernel v5.10 90/253890/1 accepted/tizen_6.5_unified accepted/tizen_7.0_unified accepted/tizen_7.0_unified_hotfix accepted/tizen_unified tizen tizen_6.5 tizen_7.0 tizen_7.0_hotfix accepted/tizen/6.5/unified/20211028.115728 accepted/tizen/7.0/unified/20221110.063607 accepted/tizen/7.0/unified/hotfix/20221116.105806 accepted/tizen/unified/20210330.111211 submit/tizen/20210330.072949 submit/tizen_6.5/20211028.162501 tizen_6.5.m2_release tizen_7.0_m2_release
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 19 Feb 2021 05:43:43 +0000 (14:43 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 19 Feb 2021 05:43:45 +0000 (14:43 +0900)
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 <sw0312.kim@samsung.com>
kernel/proc-tsm.c

index 82ae966..4527160 100644 (file)
@@ -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)
 {