git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Input: pc110pad - use no_pci_devices()
[safe/jmp/linux-2.6]
/
drivers
/
input
/
mouse
/
pc110pad.c
diff --git
a/drivers/input/mouse/pc110pad.c
b/drivers/input/mouse/pc110pad.c
index
8991ab0
..
f63995f
100644
(file)
--- a/
drivers/input/mouse/pc110pad.c
+++ b/
drivers/input/mouse/pc110pad.c
@@
-1,6
+1,4
@@
/*
/*
- * $Id: pc110pad.c,v 1.12 2001/09/25 10:12:07 vojtech Exp $
- *
* Copyright (c) 2000-2001 Vojtech Pavlik
*
* Based on the work of:
* Copyright (c) 2000-2001 Vojtech Pavlik
*
* Based on the work of:
@@
-39,6
+37,7
@@
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/pci.h>
+#include <linux/delay.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <asm/irq.h>
@@
-62,8
+61,10
@@
static irqreturn_t pc110pad_interrupt(int irq, void *ptr)
int value = inb_p(pc110pad_io);
int handshake = inb_p(pc110pad_io + 2);
int value = inb_p(pc110pad_io);
int handshake = inb_p(pc110pad_io + 2);
- outb_p(handshake | 1, pc110pad_io + 2);
- outb_p(handshake & ~1, pc110pad_io + 2);
+ outb(handshake | 1, pc110pad_io + 2);
+ udelay(2);
+ outb(handshake & ~1, pc110pad_io + 2);
+ udelay(2);
inb_p(0x64);
pc110pad_data[pc110pad_count++] = value;
inb_p(0x64);
pc110pad_data[pc110pad_count++] = value;
@@
-110,11
+111,8
@@
static int __init pc110pad_init(void)
struct pci_dev *dev;
int err;
struct pci_dev *dev;
int err;
- dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, NULL);
- if (dev) {
- pci_dev_put(dev);
+ if (!no_pci_devices())
return -ENODEV;
return -ENODEV;
- }
if (!request_region(pc110pad_io, 4, "pc110pad")) {
printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n",
if (!request_region(pc110pad_io, 4, "pc110pad")) {
printk(KERN_ERR "pc110pad: I/O area %#x-%#x in use.\n",