Hi,

Thanks for reporting the bug.
I've made a patch to fix this bug. As attachment.

I plan to do the NMU.
I'll upload to delay/10 queue after 3 days if no one complains.

Yours,
Paul

diff -Nru xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/changelog 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/changelog
--- xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/changelog        2023-06-24 
04:22:04.000000000 +0800
+++ xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/changelog        2023-08-01 
00:08:42.000000000 +0800
@@ -1,3 +1,11 @@
+xtrx-dkms (0.0.1+git20190320.5ae3a3e-3.4) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix dkms build failure with kernel 6.4 (Closes: #1041307)
+    - add debian/patches/0004-xtrx.c-fix-build-error-with-kernel-6.4.patch
+
+ -- Ying-Chun Liu (PaulLiu) <paul...@debian.org>  Tue, 01 Aug 2023 00:08:42 
+0800
+
 xtrx-dkms (0.0.1+git20190320.5ae3a3e-3.3) unstable; urgency=low
 
   * Non-maintainer upload.
diff -Nru 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0004-xtrx.c-fix-build-error-with-kernel-6.4.patch
 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0004-xtrx.c-fix-build-error-with-kernel-6.4.patch
--- 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0004-xtrx.c-fix-build-error-with-kernel-6.4.patch
        1970-01-01 08:00:00.000000000 +0800
+++ 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/0004-xtrx.c-fix-build-error-with-kernel-6.4.patch
        2023-08-01 00:08:42.000000000 +0800
@@ -0,0 +1,20 @@
+From: "Ying-Chun Liu (PaulLiu)" <paul...@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;
diff -Nru xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/series 
xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/series
--- xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/series   2023-06-24 
04:21:41.000000000 +0800
+++ xtrx-dkms-0.0.1+git20190320.5ae3a3e/debian/patches/series   2023-08-01 
00:08:42.000000000 +0800
@@ -1,3 +1,4 @@
 0001-xtrx-fix-PCI-DMA-allow-free-with-kernel-5.18.patch
 0002-xtrx.c-fix-build-error-with-kernel-6.1.patch
 0003-xtrx.c-fix-build-error-with-kernel-6.3.patch
+0004-xtrx.c-fix-build-error-with-kernel-6.4.patch
From: "Ying-Chun Liu (PaulLiu)" <paul...@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;

Attachment: OpenPGP_0x44173FA13D058888.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to