linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch 11/15] m68k: Some input drivers do not check the platform
       [not found] <20080424182940.424312704@mail.of.borg>
@ 2008-04-24 18:29 ` Geert Uytterhoeven
  0 siblings, 0 replies; only message in thread
From: Geert Uytterhoeven @ 2008-04-24 18:29 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton
  Cc: linux-m68k, linux-kernel, linux-input, linux-parisc

[-- Attachment #1: m68k-input-drivers-break-multiplatform.diff --]
[-- Type: text/plain, Size: 1373 bytes --]

From: Geert Uytterhoeven <geert@linux-m68k.org>

Some input drivers do not check whether they're actually running on the
correct platform, causing multi-platform kernels to crash if they are not.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

---
 drivers/input/misc/hp_sdc_rtc.c  |    5 +++++
 drivers/input/serio/hp_sdc_mlc.c |    5 +++++
 2 files changed, 10 insertions(+)

--- a/drivers/input/misc/hp_sdc_rtc.c
+++ b/drivers/input/misc/hp_sdc_rtc.c
@@ -691,6 +691,11 @@ static int __init hp_sdc_rtc_init(void)
 {
 	int ret;
 
+#ifdef __mc68000__
+	if (!MACH_IS_HP300)
+		return -ENODEV;
+#endif
+
 	init_MUTEX(&i8042tregs);
 
 	if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr)))
--- a/drivers/input/serio/hp_sdc_mlc.c
+++ b/drivers/input/serio/hp_sdc_mlc.c
@@ -306,6 +306,11 @@ static int __init hp_sdc_mlc_init(void)
 {
 	hil_mlc *mlc = &hp_sdc_mlc;
 
+#ifdef __mc68000__
+	if (!MACH_IS_HP300)
+		return -ENODEV;
+#endif
+
 	printk(KERN_INFO PREFIX "Registering the System Domain Controller's HIL MLC.\n");
 
 	hp_sdc_mlc_priv.emtestmode = 0;

-- 
Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-04-24 18:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20080424182940.424312704@mail.of.borg>
2008-04-24 18:29 ` [patch 11/15] m68k: Some input drivers do not check the platform Geert Uytterhoeven

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).