aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2020-04-18 21:39:19 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2020-04-19 18:48:30 +0200
commitf78bd1fe0800bca4335db1fe91e694899678eba0 (patch)
tree44f4ead5d71acc6f7553e2e34e002fed1e979b2d
parent5974f1e96884e7706dd30795195664416f06ca92 (diff)
downloadbackports-f78bd1fe0800bca4335db1fe91e694899678eba0.tar.gz
backports: fs: Adapt struct proc_ops
Since upstream commit 97a32539b956 ("proc: convert everything to "struct proc_ops"") the drivers ate not using struct file_operations for proc files any more, but the new struct proc_ops. This replaces the new names with the old ones to make the driver still work on older kernel versions. The kernel commit also removed the .owner attribute which is not added by this change again. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--backport/backport-include/linux/fs.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/backport/backport-include/linux/fs.h b/backport/backport-include/linux/fs.h
index 9854290a..4e03adf6 100644
--- a/backport/backport-include/linux/fs.h
+++ b/backport/backport-include/linux/fs.h
@@ -59,4 +59,13 @@ extern long compat_ptr_ioctl(struct file *file, unsigned int cmd,
#endif
#endif /* < 5.5 */
+#if LINUX_VERSION_IS_LESS(5,6,0)
+#define proc_ops file_operations
+#define proc_open open
+#define proc_read read
+#define proc_lseek llseek
+#define proc_release release
+#define proc_write write
+#endif /* < 5.6 */
+
#endif /* _COMPAT_LINUX_FS_H */