1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
|
From: "Ying-Chun Liu (PaulLiu)" <paulliu@debian.org>
Bug-Debian: http://bugs.debian.org/1041307
Subject: [PATCH] xtrx.c: fix build error with kernel 6.4
Last-Update: 2023-06-24
Index: xtrx-dkms-0.0.1+git20190320.5ae3a3e/xtrx.c
===================================================================
--- xtrx-dkms-0.0.1+git20190320.5ae3a3e.orig/xtrx.c
+++ xtrx-dkms-0.0.1+git20190320.5ae3a3e/xtrx.c
@@ -1532,7 +1532,11 @@ static int __init xtrx_init(void)
goto failed_chrdev;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
xtrx_class = class_create(THIS_MODULE, CLASS_NAME);
+#else
+ xtrx_class = class_create(CLASS_NAME);
+#endif
if (IS_ERR(xtrx_class)) {
printk(KERN_NOTICE PFX "Unable to register xtrx class\n");
goto failed_setup_cdev;
|