[PATCH 2/9] New set of input patches - 03-kbd98-interrupt.patch
From: Dmitry Torokhov
Date: Tue May 11 2004 - 01:29:17 EST
===================================================================
ChangeSet@xxxxxxxxxxx, 2004-05-10 01:26:53-05:00, dtor_core@xxxxxxxxxxxxx
Input: kbd98_interrupt should return irqreturn_t
98kbd.c | 26 +++++++++++++++-----------
1 files changed, 15 insertions(+), 11 deletions(-)
===================================================================
diff -Nru a/drivers/input/keyboard/98kbd.c b/drivers/input/keyboard/98kbd.c
--- a/drivers/input/keyboard/98kbd.c Tue May 11 00:55:01 2004
+++ b/drivers/input/keyboard/98kbd.c Tue May 11 00:55:01 2004
@@ -109,8 +109,8 @@
struct jis_kbd_conv jis[16];
};
-void kbd98_interrupt(struct serio *serio, unsigned char data,
- unsigned int flags, struct pt_regs *regs)
+irqreturn_t kbd98_interrupt(struct serio *serio, unsigned char data,
+ unsigned int flags, struct pt_regs *regs)
{
struct kbd98 *kbd98 = serio->private;
unsigned char scancode, keycode;
@@ -119,15 +119,15 @@
switch (data) {
case KBD98_RET_ACK:
kbd98->ack = 1;
- return;
+ goto out;
case KBD98_RET_NAK:
kbd98->ack = -1;
- return;
+ goto out;
}
if (kbd98->cmdcnt) {
kbd98->cmdbuf[--kbd98->cmdcnt] = data;
- return;
+ goto out;
}
scancode = data & KBD98_KEY;
@@ -164,7 +164,7 @@
keycode = kbd98->jis[i].emul[kbd98->shift].keycode;
if (keycode == KBD98_KEY_NULL)
- return;
+ break;
if (press) {
kbd98->emul.scancode = scancode;
@@ -187,27 +187,31 @@
}
input_sync(&kbd98->dev);
- return;
+ break;
case KEY_CAPSLOCK:
input_report_key(&kbd98->dev, keycode, 1);
input_sync(&kbd98->dev);
input_report_key(&kbd98->dev, keycode, 0);
input_sync(&kbd98->dev);
- return;
+ break;
case KBD98_KEY_NULL:
- return;
+ break;
case 0:
printk(KERN_WARNING "kbd98.c: Unknown key (scancode %#x) %s.\n",
data & KBD98_KEY, data & KBD98_RELEASE ? "released" : "pressed");
- return;
+ break;
default:
input_report_key(&kbd98->dev, keycode, press);
input_sync(&kbd98->dev);
- }
+ break;
+ }
+
+out:
+ return IRQ_HANDLED;
}
/*
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/