From 6c23d61d39d8daf63758eaf5f202139692c71331 Mon Sep 17 00:00:00 2001
From: Paolo Pisati <paolo.pisati@canonical.com>
Date: Wed, 29 Jul 2020 11:23:37 +0000
Subject: [PATCH] Linux 5.8: replace probe_kernel_read() with
 copy_from_kernel_nofault()

See also commit fe557319aa06c23cffc9346000f119547e0f289a "maccess: rename
probe_kernel_{read,write} to copy_{from,to}_kernel_nofault" upstream.

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
---
 driver/ppm_fillers.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/driver/ppm_fillers.c b/driver/ppm_fillers.c
index 0ae2381eb..a826103c7 100644
--- a/driver/ppm_fillers.c
+++ b/driver/ppm_fillers.c
@@ -716,6 +716,8 @@ long probe_kernel_read(void *dst, const void *src, size_t size)
 
 	return ret ? -EFAULT : 0;
 }
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(5, 8, 0)
+#define probe_kernel_read copy_from_kernel_nofault
 #endif
 
 static int ppm_get_tty(void)
