linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Luke Yang" <luke.adi@gmail.com>
To: "Andrew Morton" <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: [PATCH] use "#ifdef __KERNEL" to avoid compile error in input.h
Date: Fri, 7 Apr 2006 14:03:24 +0800	[thread overview]
Message-ID: <489ecd0c0604062303n562ab1bav27f8abca333a08c2@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 869 bytes --]

Hi all,

    In linux/input.h, struct input_device_id uses type kernel_ulong_t,
which is defined in linux/mod_devicetable.h,  but which is only
included when __KERNEL__ is defined. So struct input_device_id should
also be exported only in kernel mode.

Signed-off-by: Luke Yang <luke.adi@gmail.com>

diff --git a/include/linux/input.h b/include/linux/input.h
index b0e612d..0319b65 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -805,6 +805,7 @@ #define FF_AUTOCENTER       0x61

 #define FF_MAX         0x7f

+#ifdef __KERNEL__
 struct input_device_id {

        kernel_ulong_t flags;
@@ -823,6 +824,7 @@ struct input_device_id {

        kernel_ulong_t driver_info;
 };
+#endif

 /*
  * Structure for hotplug & device<->driver matching.

Best regards,
Luke Yang, Blackfin Linux kernel maintainer
luke.adi@gmail.com

[-- Attachment #2: correct_kernel_mode_define_of_input_h.patch --]
[-- Type: text/x-patch, Size: 438 bytes --]

diff --git a/include/linux/input.h b/include/linux/input.h
index b0e612d..0319b65 100644
--- a/include/linux/input.h
+++ b/include/linux/input.h
@@ -805,6 +805,7 @@ #define FF_AUTOCENTER	0x61
 
 #define FF_MAX		0x7f
 
+#ifdef __KERNEL__
 struct input_device_id {
 
 	kernel_ulong_t flags;
@@ -823,6 +824,7 @@ struct input_device_id {
 
 	kernel_ulong_t driver_info;
 };
+#endif
 
 /*
  * Structure for hotplug & device<->driver matching.

                 reply	other threads:[~2006-04-07  6:03 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=489ecd0c0604062303n562ab1bav27f8abca333a08c2@mail.gmail.com \
    --to=luke.adi@gmail.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).