From: Vojtech Pavlik <vojtech@suse.cz>
To: Christoph Hellwig <hch@infradead.org>,
Vojtech Pavlik <vojtech@suse.cz>,
torvalds@transmeta.com, linux-kernel@vger.kernel.org
Subject: Re: [patch] Update of the input subsystem - 37 csets
Date: Thu, 6 Feb 2003 15:10:25 +0100 [thread overview]
Message-ID: <20030206151025.A10594@ucw.cz> (raw)
In-Reply-To: <20030206134939.A9732@infradead.org>; from hch@infradead.org on Thu, Feb 06, 2003 at 01:49:39PM +0000
On Thu, Feb 06, 2003 at 01:49:39PM +0000, Christoph Hellwig wrote:
> * Some laptops take the 789uiojklm,. keys as number pad when NumLock is on.
> * This seems a good reason to start with NumLock off.
> */
> +#ifndef CONFIG_X86_PC9800
> #define KBD_DEFLEDS 0
> +#else
> +#define KBD_DEFLEDS (1 << VC_NUMLOCK)
> +#endif
> #endif
>
> This ifdef is the wrong way around.
The ifdef is the right way around. KBD_DEFLEDS used to be 0. Now
KBD_DEFLEDS is also 0, except when CONFIG_X86_PC9800 is defined. Note
it's an if*n*def there.
> But having something like
>
> #ifndef KBD_DEFLEDS
> #define KBD_DEFLEDS 0
> #endif
>
> and the PC98-specific stuff in a asm header sounds like a much better plan.
Yes. Send me a patch that does this, and I'll happily merge it in.
> --- bk/include/linux/serio.h Thu Feb 6 13:10:36 2003
> +++ bk+input/include/linux/serio.h Thu Feb 6 13:21:56 2003
> @@ -10,10 +10,13 @@
> */
>
> #include <linux/ioctl.h>
> -#include <linux/list.h>
>
> #define SPIOCSTYPE _IOW('q', 0x01, unsigned long)
>
> +#ifdef __KERNEL__
> +
> +#include <linux/list.h>
>
>
> Don't add more #ifdef __KERNEL__ - the kernel headers aren't supposed
> to be included from userspace.
Hmm. I know this isn't the prefered way of doing it, but so far it's the
most convenient one - serio.h still changes now and then (adding new
#defines, etc), and the only one program using it is inputattach.c. To
me it seems quite sane to have inputattach.c include this kernel header.
If you know of any other reasonably maintainable way to do it ...
--
Vojtech Pavlik
SuSE Labs
next prev parent reply other threads:[~2003-02-06 14:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-02-06 13:13 Vojtech Pavlik
2003-02-06 13:49 ` Christoph Hellwig
2003-02-06 14:10 ` Vojtech Pavlik [this message]
2003-02-06 14:14 ` Christoph Hellwig
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=20030206151025.A10594@ucw.cz \
--to=vojtech@suse.cz \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/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
all inboxes | Powered by JetHome®