forked from FritzOnFire/rcraid-dkms-arch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
linux-6.4.patch
31 lines (27 loc) · 887 Bytes
/
linux-6.4.patch
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
diff --git a/rc_init.c b/rc_init.c
index 5c6defa..3f8097b 100644
--- a/rc_init.c
+++ b/rc_init.c
@@ -2640,6 +2640,7 @@ static struct ctl_table rcraid_table[] = {
{ }
};
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
static struct ctl_table rcraid_dir_table[] = {
{ .procname = "rcraid",
.mode = 0555,
@@ -2660,6 +2661,7 @@ static struct ctl_table rcraid_root_table[] = {
.child = rcraid_scsi_dir_table },
{ }
};
+#endif
static struct ctl_table_header *rcraid_sysctl_hdr;
@@ -2681,7 +2683,9 @@ static int __init rcraid_init(void)
if (err != 0)
return err;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,4,0)
+ rcraid_sysctl_hdr = register_sysctl("dev/scsi/rcraid", rcraid_table);
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
rcraid_sysctl_hdr = register_sysctl_table(rcraid_root_table);
#else
/*