git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
kernel-2_6_6-1_441
[linux-2.6.git]
/
drivers
/
input
/
joystick
/
twidjoy.c
diff --git
a/drivers/input/joystick/twidjoy.c
b/drivers/input/joystick/twidjoy.c
index
8a98be1
..
eb5c935
100644
(file)
--- a/
drivers/input/joystick/twidjoy.c
+++ b/
drivers/input/joystick/twidjoy.c
@@
-58,6
+58,9
@@
#include <linux/serio.h>
#include <linux/init.h>
#include <linux/serio.h>
#include <linux/init.h>
+MODULE_DESCRIPTION("Handykey Twiddler keyboard as a joystick driver");
+MODULE_LICENSE("GPL");
+
/*
* Constants.
*/
/*
* Constants.
*/
@@
-142,7
+145,7
@@
static void twidjoy_process_packet(struct twidjoy *twidjoy, struct pt_regs *regs
* packet processing routine.
*/
* packet processing routine.
*/
-static
void twidjoy_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struc
pt_regs *regs)
+static
irqreturn_t twidjoy_interrupt(struct serio *serio, unsigned char data, unsigned int flags, struct
pt_regs *regs)
{
struct twidjoy *twidjoy = serio->private;
{
struct twidjoy *twidjoy = serio->private;
@@
-153,7
+156,7
@@
static void twidjoy_interrupt(struct serio *serio, unsigned char data, unsigned
if ((data & 0x80) == 0)
twidjoy->idx = 0; /* this byte starts a new packet */
else if (twidjoy->idx == 0)
if ((data & 0x80) == 0)
twidjoy->idx = 0; /* this byte starts a new packet */
else if (twidjoy->idx == 0)
- return
;
/* wrong MSB -- ignore this byte */
+ return
IRQ_HANDLED;
/* wrong MSB -- ignore this byte */
if (twidjoy->idx < TWIDJOY_MAX_LENGTH)
twidjoy->data[twidjoy->idx++] = data;
if (twidjoy->idx < TWIDJOY_MAX_LENGTH)
twidjoy->data[twidjoy->idx++] = data;
@@
-163,7
+166,7
@@
static void twidjoy_interrupt(struct serio *serio, unsigned char data, unsigned
twidjoy->idx = 0;
}
twidjoy->idx = 0;
}
- return;
+ return
IRQ_HANDLED
;
}
/*
}
/*
@@
-208,7
+211,7
@@
static void twidjoy_connect(struct serio *serio, struct serio_dev *dev)
twidjoy->dev.id.product = 0x0001;
twidjoy->dev.id.version = 0x0100;
twidjoy->dev.id.product = 0x0001;
twidjoy->dev.id.version = 0x0100;
- twidjoy->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
+ twidjoy->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_ABS);
for (bp = twidjoy_buttons; bp->bitmask; bp++) {
for (i = 0; i < bp->bitmask; i++)
for (bp = twidjoy_buttons; bp->bitmask; bp++) {
for (i = 0; i < bp->bitmask; i++)
@@
-218,8
+221,8
@@
static void twidjoy_connect(struct serio *serio, struct serio_dev *dev)
twidjoy->dev.absbit[0] = BIT(ABS_X) | BIT(ABS_Y);
for (i = 0; i < 2; i++) {
twidjoy->dev.absbit[0] = BIT(ABS_X) | BIT(ABS_Y);
for (i = 0; i < 2; i++) {
- twidjoy->dev.absmax[ABS_X+i] = 50;
- twidjoy->dev.absmin[ABS_X+i] = -50;
+ twidjoy->dev.absmax[ABS_X+i] = 50;
+ twidjoy->dev.absmin[ABS_X+i] = -50;
/* TODO: arndt 20010708: Are these values appropriate? */
twidjoy->dev.absfuzz[ABS_X+i] = 4;
/* TODO: arndt 20010708: Are these values appropriate? */
twidjoy->dev.absfuzz[ABS_X+i] = 4;