mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andries Brouwer <Andries.Brouwer@cwi.nl>,
	vojtech@ucw.cz,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [no problem] PC110 broke 2.6.9
Date: Sun, 7 Nov 2004 10:38:53 -0800 (PST)	[thread overview]
Message-ID: <Pine.LNX.4.58.0411071037140.2223@ppc970.osdl.org> (raw)
In-Reply-To: <1099845291.5564.120.camel@localhost.localdomain>



On Sun, 7 Nov 2004, Alan Cox wrote:
> 
> Works for me

Do you still have the hw somewhere? Does this patch look sane? It compiles 
for me, and if CONFIG_PCI isn't enabled the thing should still DTRT (ie 
the code all just goes away), but still..

Andries, does this fix your machine with this drievr enabled?

		Linus

-----
===== drivers/input/mouse/pc110pad.c 1.10 vs edited =====
--- 1.10/drivers/input/mouse/pc110pad.c	2004-10-09 14:13:56 -07:00
+++ edited/drivers/input/mouse/pc110pad.c	2004-11-07 10:35:45 -08:00
@@ -38,6 +38,7 @@
 #include <linux/input.h>
 #include <linux/init.h>
 #include <linux/interrupt.h>
+#include <linux/pci.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -107,8 +108,22 @@
 	return 0;
 }
 
+/*
+ * We try to avoid enabling the hardware if it's not
+ * there, but we don't know how to test. But we do know
+ * that the PC110 is not a PCI system. So if we find any
+ * PCI devices in the machine, we don't have a PC110.
+ */
 static int __init pc110pad_init(void)
 {
+	struct pci_dev *dev;
+
+	dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL);
+	if (dev) {
+		pci_dev_put(dev);
+		return -ENOENT;
+	}
+
 	if (!request_region(pc110pad_io, 4, "pc110pad")) {
 		printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n",
 				pc110pad_io, pc110pad_io + 4);

  reply	other threads:[~2004-11-07 18:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-06 23:22 Andries Brouwer
2004-11-06 23:37 ` Linus Torvalds
2004-11-07  1:42   ` Alan Cox
2004-11-07  2:57     ` Linus Torvalds
2004-11-07 16:34       ` Alan Cox
2004-11-07 18:38         ` Linus Torvalds [this message]
2004-11-07 19:13           ` Andries Brouwer
2004-11-08 11:07           ` Alan Cox
2004-11-10 23:44     ` Pavel Machek

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=Pine.LNX.4.58.0411071037140.2223@ppc970.osdl.org \
    --to=torvalds@osdl.org \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@ucw.cz \
    /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®