Skip to content

Commit

Permalink
Input: fix the example of an input device driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitri Vorobiev authored and Dmitry Torokhov committed Nov 11, 2008
1 parent 5fb17fd commit 4f48544
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Documentation/input/input-programming.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ pressed or released a BUTTON_IRQ happens. The driver could look like:

static struct input_dev *button_dev;

static void button_interrupt(int irq, void *dummy, struct pt_regs *fp)
static irqreturn_t button_interrupt(int irq, void *dummy)
{
input_report_key(button_dev, BTN_0, inb(BUTTON_PORT) & 1);
input_sync(button_dev);
return IRQ_HANDLED;
}

static int __init button_init(void)
Expand Down

0 comments on commit 4f48544

Please sign in to comment.