git: 528d25f7d8bf - main - multimedia/ptx-kmod: Remove unused DRIVER_MODULE devclass on recent main.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Thu, 23 Jun 2022 21:33:57 UTC
The branch main has been updated by jhb (doc, src committer):

URL: https://cgit.FreeBSD.org/ports/commit/?id=528d25f7d8bf1a4138d1a39ce74b7fe9758783de

commit 528d25f7d8bf1a4138d1a39ce74b7fe9758783de
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-06-23 21:33:28 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-06-23 21:33:28 +0000

    multimedia/ptx-kmod: Remove unused DRIVER_MODULE devclass on recent main.
    
    While here, remove a set but unused variable to quiet a warning.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D35262
---
 multimedia/ptx-kmod/files/patch-dev_ptx_ptx.c      | 25 ++++++++++++++++++++++
 .../ptx-kmod/files/patch-dev_ptx_ptx__proc.c       | 19 ++++++++++++++++
 2 files changed, 44 insertions(+)

diff --git a/multimedia/ptx-kmod/files/patch-dev_ptx_ptx.c b/multimedia/ptx-kmod/files/patch-dev_ptx_ptx.c
new file mode 100644
index 000000000000..808b7fcbd066
--- /dev/null
+++ b/multimedia/ptx-kmod/files/patch-dev_ptx_ptx.c
@@ -0,0 +1,25 @@
+--- dev/ptx/ptx.c.orig	2022-05-19 22:24:39 UTC
++++ dev/ptx/ptx.c
+@@ -25,8 +25,6 @@ __FBSDID("$FreeBSD$");
+ #include "ptx_sysctl.h"
+ 
+ 
+-static devclass_t ptx_devclass;
+-
+ /*
+  ***************************************
+  * PCI Attachment structures and code
+@@ -52,7 +50,13 @@ static driver_t ptx_driver = {
+ 	sizeof(struct ptx_softc),
+ };
+ 
++#if __FreeBSD_version >= 1400058
++DRIVER_MODULE(ptx, pci, ptx_driver, 0, 0);
++#else
++static devclass_t ptx_devclass;
++
+ DRIVER_MODULE(ptx, pci, ptx_driver, ptx_devclass, 0, 0);
++#endif
+ MODULE_VERSION(ptx, 1);
+ 
+ #define VENDOR_XILINX 0x10ee
diff --git a/multimedia/ptx-kmod/files/patch-dev_ptx_ptx__proc.c b/multimedia/ptx-kmod/files/patch-dev_ptx_ptx__proc.c
new file mode 100644
index 000000000000..3faa4c5fc310
--- /dev/null
+++ b/multimedia/ptx-kmod/files/patch-dev_ptx_ptx__proc.c
@@ -0,0 +1,19 @@
+--- dev/ptx/ptx_proc.c.orig	2022-05-19 22:27:03 UTC
++++ dev/ptx/ptx_proc.c
+@@ -108,7 +108,6 @@ read_dmabuf(struct ptx_softc *scp, uint32_t *dataptr)
+ 	} micro;
+ 
+ 	uint8_t id;
+-	uint8_t count;
+ 	uint8_t st;
+ 	uint8_t er;
+ 
+@@ -116,7 +115,7 @@ read_dmabuf(struct ptx_softc *scp, uint32_t *dataptr)
+ 		micro.val = *dataptr;
+ 
+ 		id    = (micro.packet.head >> 5) & 0x7;
+-		count = (micro.packet.head >> 2) & 0x7;
++		// count = (micro.packet.head >> 2) & 0x7;
+ 		st    = (micro.packet.head >> 1) & 0x1;
+ 		er    = (micro.packet.head >> 0) & 0x1;
+