mirror of
https://github.com/adulau/aha.git
synced 2024-12-27 03:06:10 +00:00
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>
This commit is contained in:
parent
5fb17fd9a2
commit
4f48544797
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue