summarylogtreecommitdiffstats
path: root/0009-kernel-6.4-class_create-1arg.patch
blob: 6fccca104bc623a5c61e52494dabd37f4f803b06 (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
38
39
diff -pNaru5 a/driver/snx_lp.c b/driver/snx_lp.c
--- a/driver/snx_lp.c	2018-11-10 05:13:34.000000000 -0500
+++ b/driver/snx_lp.c	2023-12-19 02:50:09.408124504 -0500
@@ -928,12 +928,15 @@ static int snx_lp_init(void)
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0))
     snx_devfs_handle = devfs_mk_dir(NULL, "sprinter", NULL);
 #elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17))
 	devfs_mk_dir("sprinter");
 #else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
 	snx_lp_class = class_create(THIS_MODULE, "sprinter");
-
+#else
+	snx_lp_class = class_create("sprinter");
+#endif
 	if (IS_ERR(snx_lp_class)) {
 		err = PTR_ERR(snx_lp_class);
 		goto out_reg;
 	}
 #endif
diff -pNaru5 a/driver/snx_ppdev.c b/driver/snx_ppdev.c
--- a/driver/snx_ppdev.c	2023-04-26 04:32:04.000000000 -0400
+++ b/driver/snx_ppdev.c	2023-12-19 02:49:38.138329748 -0500
@@ -1381,11 +1381,15 @@ int sunix_par_ppdev_init(void)
 #elif (LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 17))
 	for (i = 2; i < SNX_PARPORT_MAX; i++) {
 		devfs_mk_cdev(MKDEV(SNX_PPD_MAJOR, i), S_IFCHR | S_IRUGO | S_IWUGO, "parports/%d", i);
 	}
 #else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0)
 	snx_ppdev_class = class_create(THIS_MODULE, SNX_CHRDEV);
+#else
+	snx_ppdev_class = class_create(SNX_CHRDEV);
+#endif
 	if (IS_ERR(snx_ppdev_class)) {
 		err = PTR_ERR(snx_ppdev_class);
 		goto out_chrdev;
 	}