Re: [no problem] PC110 broke 2.6.9

From: Linus Torvalds
Date: Sun Nov 07 2004 - 13:41:11 EST




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);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/