[PATCH 4/9] New set of input patches - 05-twidjoy-fixes.patch

Dmitry Torokhov
2004-05-11T06:30:03Z

===================================================================

ChangeSet@1.1587.20.6, 2004-05-10 01:30:08-05:00, dtor_core@ameritech.net
Input: twidjoy module
- twidjoy_interrupt should return irqreturn_t
- add MODULE_DESCRIPTION and MODULE_LICENSE

twidjoy.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

===================================================================

diff -Nru a/drivers/input/joystick/twidjoy.c b/drivers/input/joystick/twidjoy.c
--- a/drivers/input/joystick/twidjoy.c Tue May 11 00:56:27 2004
+++ b/drivers/input/joystick/twidjoy.c Tue May 11 00:56:27 2004
@@ -58,6 +58,9 @@
#include <linux/serio.h>
#include <linux/init.h>

+MODULE_DESCRIPTION("Handykey Twiddler keyboard as a joystick driver");
+MODULE_LICENSE("GPL");
+
/*
* Constants.
*/
@@ -142,7 +145,7 @@
* 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;

@@ -153,7 +156,7 @@
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;
@@ -163,7 +166,7 @@
twidjoy->idx = 0;
}

- return;