Forum - Info Center - Eltima Software

Eltima Help Center => Software for Serial and USB communication => Topic started by: pablaasmo on January 25, 2012, 01:16:11 PM

Title: USB to ethernet connector Linux for Kernel 3.2.x fails
Post by: pablaasmo on January 25, 2012, 01:16:11 PM
When trying to install on my Fedora 16 with kernel 3.2.1 it fails with the following error:
Code: [Select]
DKMS make.log for eveusb-1.0.0 for kernel 3.2.1-3.fc16.x86_64 (x86_64)
on. 25. jan. 12:52:31 +0100 2012
make: Entering directory `/usr/src/kernels/3.2.1-3.fc16.x86_64'
  LD      /var/lib/dkms/eveusb/1.0.0/build/built-in.o
KERNELRELEASE=3.2.1-3.fc16.x86_64, VERSION 3, PATCHLEVEL 2, SUBLEVEL 1, EXTRAVERSION=
cd /var/lib/dkms/eveusb/1.0.0/build/include/linux && ln -sf ../3.2.1 usb
  CC [M]  /var/lib/dkms/eveusb/1.0.0/build/module.o
  CC [M]  /var/lib/dkms/eveusb/1.0.0/build/platform.o
/var/lib/dkms/eveusb/1.0.0/build/platform.c:175:12: error: ‘THIS_MODULE’ undeclared here (not in a function)
make[1]: *** [/var/lib/dkms/eveusb/1.0.0/build/platform.o] Error 1
make: *** [_module_/var/lib/dkms/eveusb/1.0.0/build] Error 2
make: Leaving directory `/usr/src/kernels/3.2.1-3.fc16.x86_64'

Anyone have a solution to this.
 :)
Title: Re: USB to ethernet connector Linux for Kernel 3.2.x fails
Post by: alexander-britt on January 25, 2012, 04:21:31 PM
I've replied to you via e-mail.
Title: Re: USB to ethernet connector Linux for Kernel 3.2.x fails
Post by: pablaasmo on January 31, 2012, 08:12:49 AM
You just need to add one line in the file (according to http://comments.gmane.org/gmane.linux.ports.arm.kernel/139002):

 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/init.h>

this probably solves the issue.
Title: Re: USB to ethernet connector Linux for Kernel 3.2.x fails
Post by: pablaasmo on January 31, 2012, 08:55:13 AM
You just need to add one line in the file (according to http://comments.gmane.org/gmane.linux.ports.arm.kernel/139002):

 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/init.h>

this probably solves the issue.

You have to add 'linux/module.h' to the files 'platform.c, 'dev.c' and 'usb_device.c' to make the module compile.