Commit 72430fed authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Vojtech Pavlik

Input: kbd98_interrupt should return irqreturn_t

parent 7c51a30e
...@@ -109,7 +109,7 @@ struct kbd98 { ...@@ -109,7 +109,7 @@ struct kbd98 {
struct jis_kbd_conv jis[16]; struct jis_kbd_conv jis[16];
}; };
void kbd98_interrupt(struct serio *serio, unsigned char data, irqreturn_t kbd98_interrupt(struct serio *serio, unsigned char data,
unsigned int flags, struct pt_regs *regs) unsigned int flags, struct pt_regs *regs)
{ {
struct kbd98 *kbd98 = serio->private; struct kbd98 *kbd98 = serio->private;
...@@ -119,15 +119,15 @@ void kbd98_interrupt(struct serio *serio, unsigned char data, ...@@ -119,15 +119,15 @@ void kbd98_interrupt(struct serio *serio, unsigned char data,
switch (data) { switch (data) {
case KBD98_RET_ACK: case KBD98_RET_ACK:
kbd98->ack = 1; kbd98->ack = 1;
return; goto out;
case KBD98_RET_NAK: case KBD98_RET_NAK:
kbd98->ack = -1; kbd98->ack = -1;
return; goto out;
} }
if (kbd98->cmdcnt) { if (kbd98->cmdcnt) {
kbd98->cmdbuf[--kbd98->cmdcnt] = data; kbd98->cmdbuf[--kbd98->cmdcnt] = data;
return; goto out;
} }
scancode = data & KBD98_KEY; scancode = data & KBD98_KEY;
...@@ -164,7 +164,7 @@ void kbd98_interrupt(struct serio *serio, unsigned char data, ...@@ -164,7 +164,7 @@ void kbd98_interrupt(struct serio *serio, unsigned char data,
keycode = kbd98->jis[i].emul[kbd98->shift].keycode; keycode = kbd98->jis[i].emul[kbd98->shift].keycode;
if (keycode == KBD98_KEY_NULL) if (keycode == KBD98_KEY_NULL)
return; break;
if (press) { if (press) {
kbd98->emul.scancode = scancode; kbd98->emul.scancode = scancode;
...@@ -187,27 +187,31 @@ void kbd98_interrupt(struct serio *serio, unsigned char data, ...@@ -187,27 +187,31 @@ void kbd98_interrupt(struct serio *serio, unsigned char data,
} }
input_sync(&kbd98->dev); input_sync(&kbd98->dev);
return; break;
case KEY_CAPSLOCK: case KEY_CAPSLOCK:
input_report_key(&kbd98->dev, keycode, 1); input_report_key(&kbd98->dev, keycode, 1);
input_sync(&kbd98->dev); input_sync(&kbd98->dev);
input_report_key(&kbd98->dev, keycode, 0); input_report_key(&kbd98->dev, keycode, 0);
input_sync(&kbd98->dev); input_sync(&kbd98->dev);
return; break;
case KBD98_KEY_NULL: case KBD98_KEY_NULL:
return; break;
case 0: case 0:
printk(KERN_WARNING "kbd98.c: Unknown key (scancode %#x) %s.\n", printk(KERN_WARNING "kbd98.c: Unknown key (scancode %#x) %s.\n",
data & KBD98_KEY, data & KBD98_RELEASE ? "released" : "pressed"); data & KBD98_KEY, data & KBD98_RELEASE ? "released" : "pressed");
return; break;
default: default:
input_report_key(&kbd98->dev, keycode, press); input_report_key(&kbd98->dev, keycode, press);
input_sync(&kbd98->dev); input_sync(&kbd98->dev);
break;
} }
out:
return IRQ_HANDLED;
} }
/* /*
......
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