blob: 36228bc4006bb70c6b0f8a9cb169ed04dba6dacc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
diff -Nur a/kernel/nvidia/os-interface.c b/kernel/nvidia/os-interface.c
--- a/kernel/nvidia/os-interface.c 2018-08-22 01:55:22.000000000 +0100
+++ b/kernel/nvidia/os-interface.c 2019-02-10 03:28:33.359055441 +0000
@@ -16,6 +16,8 @@
#include "nv-gpu-numa.h"
+#include <linux/version.h>
+
#define MAX_ERROR_STRING 512
static char nv_error_string[MAX_ERROR_STRING];
nv_spinlock_t nv_error_string_lock;
@@ -1697,7 +1699,12 @@
struct nv_ipmi_softc
{
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+ struct ipmi_user *p_user; // ptr to ipmi_msghandler user structure
+#else
ipmi_user_t p_user; // ptr to ipmi_msghandler user structure
+#endif
+
spinlock_t msg_lock;
struct list_head msgs;
NvU32 seqNum; //request sequence number
@@ -1706,7 +1713,11 @@
static inline int
nv_ipmi_set_my_address
(
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 19, 0)
+ struct ipmi_user *user,
+#else
ipmi_user_t user,
+#endif
unsigned char address
)
{
|