Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/serio
In directory usw-pr-cvs1:/tmp/cvs-serv21567
Modified Files:
i8042.c i8042.h
Removed Files:
serport_old.c
Log Message:
Renamed to serport.c
Index: i8042.c
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/i8042.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- i8042.c 15 Feb 2002 00:25:24 -0000 1.19
+++ i8042.c 1 Mar 2002 21:52:47 -0000 1.20
@@ -58,6 +58,7 @@
struct i8042_values {
int irq;
+ int ioport;
unsigned char disable;
unsigned char irqen;
unsigned char exists;
@@ -264,7 +265,7 @@
* Allocate the interrupt
*/
- if (request_irq(values->irq, i8042_interrupt, 0, "i8042", NULL)) {
+ if (request_irq(values->irq, i8042_interrupt, 0, "i8042", values)) {
printk(KERN_ERR "i8042.c: Can't get irq %d for %s\n", values->irq, values->name);
return -1;
}
@@ -324,6 +325,7 @@
static struct i8042_values i8042_kbd_values = {
irq: I8042_KBD_IRQ,
+ ioport: I8042_DATA_REG,
irqen: I8042_CTR_KBDINT,
disable: I8042_CTR_KBDDIS,
name: "KBD",
@@ -343,6 +345,7 @@
static struct i8042_values i8042_aux_values = {
irq: I8042_AUX_IRQ,
+ ioport: I8042_DATA_REG,
irqen: I8042_CTR_AUXINT,
disable: I8042_CTR_AUXDIS,
name: "AUX",
@@ -368,12 +371,13 @@
static void i8042_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
- unsigned long flags;
+ struct i8042_values *values = dev_id;
unsigned char str, data;
+ unsigned long flags;
spin_lock_irqsave(&i8042_lock, flags);
- while ((str = inb(I8042_STATUS_REG)) & I8042_STR_OBF) {
+ while ((str = inb(values->ioport + 4)) & I8042_STR_OBF) {
data = inb(I8042_DATA_REG);
@@ -382,11 +386,11 @@
data, (str & I8042_STR_AUXDATA) ? "aux" : "kbd", (int) (jiffies - i8042_start));
#endif
- if (i8042_aux_values.exists && (str & I8042_STR_AUXDATA)) {
+ if (values->exists && (str & I8042_STR_AUXDATA)) {
if (i8042_aux_port.dev)
i8042_aux_port.dev->interrupt(&i8042_aux_port, data, 0);
} else {
- if (i8042_kbd_values.exists && i8042_kbd_port.dev) {
+ if (i8042_kbd_port.dev) {
if (!i8042_direct) {
if (data > 0x7f) {
if (test_and_clear_bit(data & 0x7f, i8042_unxlate_seen)) {
@@ -402,7 +406,6 @@
}
}
}
-
spin_unlock_irqrestore(&i8042_lock, flags);
}
@@ -418,7 +421,7 @@
* Check the i/o region before we touch it.
*/
#if !defined(__i386__) && !defined(__sh__) && !defined(__alpha__)
- if (check_region(I8042_DATA_REG, 16)) {
+ if (check_region(i8042_kbd_values.ioport, 16)) {
printk(KERN_ERR "i8042.c: %#x port already in use!\n", I8042_DATA_REG);
return -1;
}
Index: i8042.h
===================================================================
RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/serio/i8042.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- i8042.h 2 Feb 2002 22:26:44 -0000 1.9
+++ i8042.h 1 Mar 2002 21:52:48 -0000 1.10
@@ -66,9 +66,9 @@
* Register numbers.
*/
-#define I8042_COMMAND_REG CONFIG_I8042_REG_BASE + 4
-#define I8042_STATUS_REG CONFIG_I8042_REG_BASE + 4
#define I8042_DATA_REG CONFIG_I8042_REG_BASE
+#define I8042_COMMAND_REG I8042_DATA_REG + 4
+#define I8042_STATUS_REG I8042_DATA_REG + 4
/*
* Status register bits.
--- serport_old.c DELETED ---
|