Commit 18b8c734 authored by Vojtech Pavlik's avatar Vojtech Pavlik

Some fixes after conflict merge, in rpcmouse.c and rpckbd.c

parent ccb83656
......@@ -2,7 +2,7 @@
* Acorn RiscPC mouse driver for Linux/ARM
*
* Copyright (c) 2000-2002 Vojtech Pavlik
* Copyright (C) 1996-1998 Russell King
* Copyright (C) 1996-2002 Russell King
*
*/
......@@ -34,7 +34,6 @@ MODULE_DESCRIPTION("Acorn RiscPC mouse driver");
MODULE_LICENSE("GPL");
static short rpcmouse_lastx, rpcmouse_lasty;
static unsigned int rpcmouse_lastb;
static struct input_dev rpcmouse_dev = {
.evbit = { BIT(EV_KEY) | BIT(EV_REL) },
......@@ -53,12 +52,11 @@ static struct input_dev rpcmouse_dev = {
static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs)
{
struct input_dev *dev = dev_id;
short x, y, dx, dy;
unsigned int b;
short x, y, dx, dy, b;
x = (short) iomd_readl(IOMD_MOUSEX);
y = (short) iomd_readl(IOMD_MOUSEY);
b = (short) (__raw_readl(0xe0310000) >> 4) & 7;
b = (short) (__raw_readl(0xe0310000) ^ 0x70);
dx = x - rpcmouse_lastx;
dy = y - rpcmouse_lasty;
......@@ -66,21 +64,14 @@ static void rpcmouse_irq(int irq, void *dev_id, struct pt_regs *regs)
rpcmouse_lastx = x;
rpcmouse_lasty = y;
if (dx)
input_report_rel(dev, REL_X, dx);
if (dy)
input_report_rel(dev, REL_Y, -dy);
b = __raw_readl(0xe0310000) ^ 0x70;
if (b != rpcmouse_lastb) {
input_report_key(dev, BTN_LEFT, b & 0x40);
input_report_key(dev, BTN_MIDDLE, b & 0x20);
input_report_key(dev, BTN_RIGHT, b & 0x10);
}
if (b != rpcmouse_lastb || dx || dy)
input_sync(dev);
rpcmouse_lastb = b;
input_sync(dev);
}
static int __init rpcmouse_init(void)
......
......@@ -2,11 +2,7 @@
* $Id: rpckbd.c,v 1.7 2001/09/25 10:12:07 vojtech Exp $
*
* Copyright (c) 2000-2001 Vojtech Pavlik
*
* Based on the work of:
* Russell King (thanks)
*
* Fixes by Russell King.
* Copyright (c) 2002 Russell King
*/
/*
......@@ -44,7 +40,7 @@
#include <asm/hardware/iomd.h>
#include <asm/system.h>
MODULE_AUTHOR("Vojtech Pavlik <vojtech@ucw.cz>");
MODULE_AUTHOR("Vojtech Pavlik, Russell King");
MODULE_DESCRIPTION("Acorn RiscPC PS/2 keyboard controller driver");
MODULE_LICENSE("GPL");
......@@ -85,12 +81,12 @@ static int rpckbd_open(struct serio *port)
iomd_readb(IOMD_KARTRX);
if (request_irq(IRQ_KEYBOARDRX, rpckbd_rx, 0, "rpckbd", port) != 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");
return -EBUSY;
}
if (request_irq(IRQ_KEYBOARDTX, rpckbd_tx, 0, "rpckbd", port) != 0) {
printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ!\n");
printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ\n");
free_irq(IRQ_KEYBOARDRX, NULL);
return -EBUSY;
}
......
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