From: Cris C. <clc...@gm...> - 2025-08-26 21:48:29
|
Solved. RHEL 9's 5.14 kernel must be showing up as greater than 6.4 Changed device.h from: #if LINUX_VERSION_CODE < KERNEL_VERSION(6,4,0) #define CLASS_CREATE(owner, name) \ class_create(owner, name) #else #define CLASS_CREATE(owner, name) \ class_create(name) #endif To: #define CLASS_CREATE(owner, name) \ class_create(name) On Tue, Aug 26, 2025 at 3:57 PM Cris Collins <clc...@gm...> wrote: > > > Trying to get the ni_usb_gpib driver to compile on a RHEL 9 system with > the 5.14.0 kernel. But get the following error. We had been using 4.1.0 > under RHEL 7 without problem. Any help is appreciated. > > > > CC [M] > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.o > > In file included from > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/include/compat_device_create.h:30, > > from > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c:20: > > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c: > In function ‘gpib_common_init_module’: > > ./include/linux/export.h:17:22: error: passing argument 1 of > ‘class_create’ from incompatible pointer type > [-Werror=incompatible-pointer-types] > > 17 | #define THIS_MODULE (&__this_module) > > | ~^~~~~~~~~~~~~~~ > > | | > > | struct module * > > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/compat/include/linux/device.h:52:22: > note: in definition of macro ‘CLASS_CREATE’ > > 52 | class_create(owner, name) > > | ^~~~~ > > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c:210:35: > note: in expansion of macro ‘THIS_MODULE’ > > 210 | gpib_class = CLASS_CREATE(THIS_MODULE, "gpib_common"); > > | ^~~~~~~~~~~ > > In file included from ./include/linux/device.h:31, > > from > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/compat/include/linux/device.h:89, > > from > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/include/compat_device_create.h:30, > > from > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c:20: > > ./include/linux/device/class.h:230:54: note: expected ‘const char *’ but > argument is of type ‘struct module *’ > > 230 | struct class * __must_check class_create(const char *name); > > | ~~~~~~~~~~~~^~~~ > > In file included from > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/include/compat_device_create.h:30, > > from > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/drivers/gpib/sys/osinit.c:20: > > /root/Downloads/linux-gpib-4.3.6/linux-gpib-kernel-4.3.6/compat/include/linux/device.h:52:9: > error: too many arguments to function ‘class_create’ > > 52 | class_create(owner, name) > > > > > > > > > > -- > This is my G-Mail account. I do not usually check it. > -- This is my G-Mail account. I do not usually check it. |