diff options
author | Seung-Woo Kim <sw0312.kim@samsung.com> | 2021-02-19 14:43:43 +0900 |
---|---|---|
committer | Seung-Woo Kim <sw0312.kim@samsung.com> | 2021-02-19 14:43:45 +0900 |
commit | 901f4d0ec2c8fcadd996a7a35a36c92efa3b530d (patch) | |
tree | aa21a327bcb47afb9dda8a4b8a1d40a6fa5f8508 | |
parent | 75702f07efa1ebaa0927cc4dd179a6c7a04c5b9e (diff) | |
download | stability-monitor-kmod-rpi3-tizen_6.5.tar.gz stability-monitor-kmod-rpi3-tizen_6.5.tar.bz2 stability-monitor-kmod-rpi3-tizen_6.5.zip |
Support Linux kernel v5.10tizen_7.0_m2_releasetizen_6.5.m2_releasesubmit/tizen_6.5/20211028.162501submit/tizen/20210330.072949accepted/tizen/unified/20210330.111211accepted/tizen/7.0/unified/hotfix/20221116.105806accepted/tizen/7.0/unified/20221110.063607accepted/tizen/6.5/unified/20211028.115728tizen_7.0_hotfixtizen_7.0tizen_6.5tizenaccepted/tizen_unifiedaccepted/tizen_7.0_unified_hotfixaccepted/tizen_7.0_unifiedaccepted/tizen_6.5_unified
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>
-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) { |