From: Szymon Janc <szymon.janc@tieto.com>
To: Eugene Krasnikov <k.eugene.e@gmail.com>
Cc: "backports@vger.kernel.org" <backports@vger.kernel.org>,
linux-wireless <linux-wireless@vger.kernel.org>
Subject: Re: include/linux/device.h:715:38: error: 'THIS_MODULE' undeclared
Date: Wed, 10 Apr 2013 13:56:56 +0200 [thread overview]
Message-ID: <8701347.YaW7b4Fxgt@uw000953> (raw)
In-Reply-To: <CAFSJ42ZZH7Y+MPUURG_hQRuwhv8UKkF5sQQebsTjhH0uT07rjA@mail.gmail.com>
On Wednesday 10 of April 2013 12:20:37 Eugene Krasnikov wrote:
Hi Eugene,
> I have tried to build latest compat-drivers for android/cyanogenmod
> kernel version 3.0.60 but it fails with the following error:
>
> /cyanogenmod/kernel/sony/msm8x60/include/linux/device.h: In function
> 'root_device_register':
> /cyanogenmod/kernel/sony/msm8x60/include/linux/device.h:715:38: error:
> 'THIS_MODULE' undeclared (first use in this function)
>
> Command line that is used to build compat-drivers is:
>
> make KLIB=/cyanogenmod/out/target/product/mint/obj/KERNEL_OBJ
> KLIB_BUILD=/cyanogenmod/out/target/product/mint/obj/KERNEL_OBJ
> ARCH=arm CROSS_COMPILE=/cyanogenmod/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin/arm-eabi-
>
> Did anybody meet such an error?
> Patch bellow was used as a workaround to this error, but i would like
> to find a proper solution.
I had similar issue with grouper (nexus7) 3.1 kernel. This was due to DMA_BUF
stuff being backported to that kernel (and that pulled also export.h change).
Maybe it is same with CM kernel?
This fixed build for me:
---
include/linux/export.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/export.h b/include/linux/export.h
index f7842b7..5ef58c5 100644
--- a/include/linux/export.h
+++ b/include/linux/export.h
@@ -3,10 +3,10 @@
#include <linux/version.h>
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0))
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0))
#include_next <linux/export.h>
#else
#include <linux/module.h>
-#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,2,0)) */
+#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(3,1,0)) */
#endif /* _COMPAT_LINUX_EXPORT_H */
You can check if enabling this for kernel >=3.0.0 works for you:)
--
BR
Szymon Janc
next prev parent reply other threads:[~2013-04-10 11:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-10 9:20 include/linux/device.h:715:38: error: 'THIS_MODULE' undeclared Eugene Krasnikov
2013-04-10 11:56 ` Szymon Janc [this message]
2013-04-10 14:21 ` Eugene Krasnikov
2013-04-11 9:17 ` Szymon Janc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8701347.YaW7b4Fxgt@uw000953 \
--to=szymon.janc@tieto.com \
--cc=backports@vger.kernel.org \
--cc=k.eugene.e@gmail.com \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox