diff options
author | Dmitri Vorobiev <dmitri.vorobiev@movial.fi> | 2008-11-11 11:40:23 -0500 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2008-11-11 11:41:49 -0500 |
commit | 4f485447973284f73e4e7cac3ab1d1e5fcd8aece (patch) | |
tree | d8f773bd9d5c6444863c7e8978ef534d9344a2e4 /Documentation | |
parent | 5fb17fd9a2d05be77be91369aa2f7b0db42fc8b4 (diff) |
Input: fix the example of an input device driver
This patch fixes a wrong interrupt handler example given in the "Hello,
world!"-like input driver in Documentation/input/input-programming.txt.
Signed-off-by: Dmitri Vorobiev <dmitri.vorobiev@movial.fi>
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/input/input-programming.txt | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Documentation/input/input-programming.txt b/Documentation/input/input-programming.txt index 81905e81585e..7f8b9d97bc47 100644 --- a/Documentation/input/input-programming.txt +++ b/Documentation/input/input-programming.txt | |||
@@ -20,10 +20,11 @@ pressed or released a BUTTON_IRQ happens. The driver could look like: | |||
20 | 20 | ||
21 | static struct input_dev *button_dev; | 21 | static struct input_dev *button_dev; |
22 | 22 | ||
23 | static void button_interrupt(int irq, void *dummy, struct pt_regs *fp) | 23 | static irqreturn_t button_interrupt(int irq, void *dummy) |
24 | { | 24 | { |
25 | input_report_key(button_dev, BTN_0, inb(BUTTON_PORT) & 1); | 25 | input_report_key(button_dev, BTN_0, inb(BUTTON_PORT) & 1); |
26 | input_sync(button_dev); | 26 | input_sync(button_dev); |
27 | return IRQ_HANDLED; | ||
27 | } | 28 | } |
28 | 29 | ||
29 | static int __init button_init(void) | 30 | static int __init button_init(void) |