[PATCH 7/8] backports: fs: Adapt struct proc_ops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 backport/backport-include/linux/fs.h | 9 +++++++++
 1 file changed, 9 insertions(+)

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 */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux