From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Randy Dunlap <randy.dunlap@oracle.com>, jkosina@suse.cz
Cc: lkml <linux-kernel@vger.kernel.org>,
Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, akpm <akpm@linux-foundation.org>
Subject: Re: [PATCH linux-next] serio: add ifdef for i8042 build fix
Date: Thu, 29 May 2008 14:46:06 -0400 [thread overview]
Message-ID: <20080529184606.GA17728@anvil.corenet.prv> (raw)
In-Reply-To: <20080529095633.8893b4ec.randy.dunlap@oracle.com>
Hi Randy,
On Thu, May 29, 2008 at 09:56:33AM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> Restrict variable usage by bounding it with ifdef/endif CONFIG_PNP.
>
> linux-next-20080529/drivers/input/serio/i8042-x86ia64io.h:590: error: 'i8042_nopnp' undeclared (first use in this function)
>
Thank you for the report. I'd rahther changed it as in the patch below.
What do you think?
If everyone agrees then I will fold it in Jiri's original patch to keep
the trees bisectable.
--
Dmitry
diff --git a/drivers/input/serio/i8042-x86ia64io.h b/drivers/input/serio/i8042-x86ia64io.h
index 709c9d9..2289e3a 100644
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -63,7 +63,7 @@ static inline void i8042_write_command(int val)
outb(val, I8042_COMMAND_REG);
}
-#if defined(__i386__) || defined(__x86_64__)
+#ifdef CONFIG_X86
#include <linux/dmi.h>
@@ -287,6 +287,7 @@ static struct dmi_system_id __initdata i8042_dmi_nomux_table[] = {
{ }
};
+#ifdef CONFIG_PNP
static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = {
{
.ident = "Intel MBO Desktop D845PESV",
@@ -297,13 +298,8 @@ static struct dmi_system_id __initdata i8042_dmi_nopnp_table[] = {
},
{ }
};
-
#endif
-#ifdef CONFIG_X86
-
-#include <linux/dmi.h>
-
/*
* Some Wistron based laptops need us to explicitly enable the 'Dritek
* keyboard extension' to make their extra keys start generating scancodes.
@@ -351,7 +347,6 @@ static struct dmi_system_id __initdata i8042_dmi_dritek_table[] = {
#endif /* CONFIG_X86 */
-
#ifdef CONFIG_PNP
#include <linux/pnp.h>
@@ -461,6 +456,11 @@ static int __init i8042_pnp_init(void)
int pnp_data_busted = 0;
int err;
+#ifdef CONFIG_X86
+ if (dmi_check_system(i8042_dmi_nopnp_table))
+ i8042_nopnp = 1;
+#endif
+
if (i8042_nopnp) {
printk(KERN_INFO "i8042: PNP detection disabled\n");
return 0;
@@ -578,10 +578,6 @@ static int __init i8042_platform_init(void)
i8042_kbd_irq = I8042_MAP_IRQ(1);
i8042_aux_irq = I8042_MAP_IRQ(12);
-#if defined(__i386__) || defined(__x86_64__)
- if (dmi_check_system(i8042_dmi_nopnp_table))
- i8042_nopnp = 1;
-#endif
retval = i8042_pnp_init();
if (retval)
return retval;
@@ -590,15 +586,13 @@ static int __init i8042_platform_init(void)
i8042_reset = 1;
#endif
-#if defined(__i386__) || defined(__x86_64__)
+#ifdef CONFIG_X86
if (dmi_check_system(i8042_dmi_noloop_table))
i8042_noloop = 1;
if (dmi_check_system(i8042_dmi_nomux_table))
i8042_nomux = 1;
-#endif
-#ifdef CONFIG_X86
if (dmi_check_system(i8042_dmi_dritek_table))
i8042_dritek = 1;
#endif /* CONFIG_X86 */
next prev parent reply other threads:[~2008-05-29 18:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-29 8:25 linux-next: Tree for May 29 Stephen Rothwell
2008-05-29 16:44 ` Randy Dunlap
2008-05-29 16:56 ` [PATCH linux-next] serio: add ifdef for i8042 build fix Randy Dunlap
2008-05-29 18:46 ` Dmitry Torokhov [this message]
2008-05-29 19:17 ` Randy Dunlap
2008-06-02 8:44 ` Jiri Kosina
2008-05-29 18:28 ` [PATCH] linux-next: Tree for May 29 - build failure s390x -typo in ccw_timeout_log() Kamalesh Babulal
2008-05-29 19:06 ` Greg KH
2008-05-29 20:21 ` [BUG] linux-next: Tree for May 29 - WARNING: at kernel/lockdep.c:2680 Kamalesh Babulal
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=20080529184606.GA17728@anvil.corenet.prv \
--to=dmitry.torokhov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=randy.dunlap@oracle.com \
--cc=sfr@canb.auug.org.au \
/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).