Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F105526121
D26651.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D26651.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h
--- a/sys/compat/linuxkpi/common/include/linux/pci.h
+++ b/sys/compat/linuxkpi/common/include/linux/pci.h
@@ -41,6 +41,7 @@
#include <sys/param.h>
#include <sys/bus.h>
+#include <sys/module.h>
#include <sys/nv.h>
#include <sys/pciio.h>
#include <sys/rman.h>
@@ -69,7 +70,26 @@
uintptr_t driver_data;
};
-#define MODULE_DEVICE_TABLE(bus, table)
+/* Linux has an empty element at the end of the ID table -> nitems() - 1. */
+#define MODULE_DEVICE_TABLE(_bus, _table) \
+ \
+static device_method_t _ ## _bus ## _ ## _table ## _methods[] = { \
+ DEVMETHOD_END \
+}; \
+ \
+static driver_t _ ## _bus ## _ ## _table ## _driver = { \
+ "lkpi_" #_bus #_table, \
+ _ ## _bus ## _ ## _table ## _methods, \
+ 0 \
+}; \
+ \
+static devclass_t _ ## _bus ## _ ## _table ## _devclass; \
+ \
+DRIVER_MODULE(lkpi_ ## _table, pci, _ ## _bus ## _ ## _table ## _driver,\
+ _ ## _bus ## _ ## _table ## _devclass, 0, 0); \
+ \
+MODULE_PNP_INFO("U32:vendor;U32:device;V32:subvendor;V32:subdevice", \
+ _bus, lkpi_ ## _table, _table, nitems(_table) - 1)
#define PCI_ANY_ID -1U
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 18, 7:00 AM (20 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15480404
Default Alt Text
D26651.diff (1 KB)
Attached To
Mode
D26651: linuxkpi: MODULE_DEVICE_TABLE to MODULE_PNP_INFO
Attached
Detach File
Event Timeline
Log In to Comment