Use the size of one bge_devs element for the MODULE_PNP_INFO macro,

instead of the size of the whole bge_devs array.

This should stop kldxref searching beyond the end of .rodata when it
processes relocations, and emitting "unhandled relocation type" errors,
at least on i386.
This commit is contained in:
dim 2018-08-18 20:41:43 +00:00
parent f11db4810b
commit f73f425739

View File

@ -548,7 +548,7 @@ static devclass_t bge_devclass;
DRIVER_MODULE(bge, pci, bge_driver, bge_devclass, 0, 0);
MODULE_PNP_INFO("U16:vendor;U16:device", pci, bge, bge_devs,
sizeof(bge_devs), nitems(bge_devs) - 1);
sizeof(bge_devs[0]), nitems(bge_devs) - 1);
DRIVER_MODULE(miibus, bge, miibus_driver, miibus_devclass, 0, 0);
static int bge_allow_asf = 1;