Browse Source

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
2022Q3
John Baldwin 2 weeks ago
parent
commit
528d25f7d8
  1. 25
      multimedia/ptx-kmod/files/patch-dev_ptx_ptx.c
  2. 19
      multimedia/ptx-kmod/files/patch-dev_ptx_ptx__proc.c

25
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

19
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;
Loading…
Cancel
Save