Commit 7306c5f4 authored by Vojtech Pavlik's avatar Vojtech Pavlik

The following fixes compilation errors in the Acorn

related input drivers.
  -- Russell King <rmk@arm.linux.org.uk>
parent d41a84b5
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/input.h>
#include <asm/hardware.h> #include <asm/hardware.h>
#include <asm/irq.h> #include <asm/irq.h>
...@@ -59,9 +60,9 @@ static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs) ...@@ -59,9 +60,9 @@ static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs)
input_report_rel(&rpcmouse_dev, REL_X, dx); input_report_rel(&rpcmouse_dev, REL_X, dx);
input_report_rel(&rpcmouse_dev, REL_Y, dy); input_report_rel(&rpcmouse_dev, REL_Y, dy);
input_report_key(&rpcmouse_dev, BTN_LEFT, buttons & 0x10); input_report_key(&rpcmouse_dev, BTN_LEFT, b & 0x10);
input_report_key(&rpcmouse_dev, BTN_MIDDLE, buttons & 0x20); input_report_key(&rpcmouse_dev, BTN_MIDDLE, b & 0x20);
input_report_key(&rpcmouse_dev, BTN_RIGHT, buttons & 0x40); input_report_key(&rpcmouse_dev, BTN_RIGHT, b & 0x40);
} }
static int __init rpcmouse_init(void) static int __init rpcmouse_init(void)
......
...@@ -47,8 +47,10 @@ MODULE_LICENSE("GPL"); ...@@ -47,8 +47,10 @@ MODULE_LICENSE("GPL");
static inline void rpckbd_write(unsigned char val) static inline void rpckbd_write(unsigned char val)
{ {
while(!(inb(IOMD_KCTRL) & (1 << 7))); while (!(iomd_readb(IOMD_KCTRL) & (1 << 7)))
outb(val, IOMD_KARTTX); cpu_relax();
iomd_writeb(val, IOMD_KARTTX);
} }
static struct serio rpckbd_port = static struct serio rpckbd_port =
...@@ -61,11 +63,14 @@ static struct serio rpckbd_port = ...@@ -61,11 +63,14 @@ static struct serio rpckbd_port =
static void rpckbd_rx(int irq, void *dev_id, struct pt_regs *regs) static void rpckbd_rx(int irq, void *dev_id, struct pt_regs *regs)
{ {
unsigned int byte;
kbd_pt_regs = regs; kbd_pt_regs = regs;
while (inb(IOMD_KCTRL) & (1 << 5)) while (iomd_readb(IOMD_KCTRL) & (1 << 5)) {
serio_interrupt(&rpckbd_port, inb(IOMD_KARTRX), 0); byte = iomd_readb(IOMD_KARTRX);
serio_interrupt(&rpckbd_port, byte, 0);
}
} }
static void rpckbd_tx(int irq, void *dev_id, struct pt_regs *regs) static void rpckbd_tx(int irq, void *dev_id, struct pt_regs *regs)
...@@ -74,13 +79,10 @@ static void rpckbd_tx(int irq, void *dev_id, struct pt_regs *regs) ...@@ -74,13 +79,10 @@ static void rpckbd_tx(int irq, void *dev_id, struct pt_regs *regs)
static int __init rpckbd_init(void) static int __init rpckbd_init(void)
{ {
unsigned long flags;
/* Reset the keyboard state machine. */ /* Reset the keyboard state machine. */
outb(0, IOMD_KCTRL); iomd_writeb(0, IOMD_KCTRL);
outb(8, IOMD_KCTRL); iomd_writeb(8, IOMD_KCTRL);
iomd_readb(IOMD_KARTRX);
save_flags_cli(flags);
if (request_irq(IRQ_KEYBOARDRX, rpckbd_rx, 0, "rpckbd", NULL) != 0) { if (request_irq(IRQ_KEYBOARDRX, rpckbd_rx, 0, "rpckbd", NULL) != 0) {
printk(KERN_ERR "rpckbd.c: Could not allocate keyboard receive IRQ!\n") printk(KERN_ERR "rpckbd.c: Could not allocate keyboard receive IRQ!\n")
...@@ -93,14 +95,7 @@ static int __init rpckbd_init(void) ...@@ -93,14 +95,7 @@ static int __init rpckbd_init(void)
return -EBUSY; return -EBUSY;
} }
disable_irq(IRQ_KEYBOARDTX);
(void)IOMD_KARTRX;
restore_flags(flags);
register_serio_port(&rpckbd_port); register_serio_port(&rpckbd_port);
printk(KERN_INFO "serio: RiscPC PS/2 kbd port irq %d %d\n", IRQ_KEYBOARDRX, IRQ_KEYBOARDTX);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment