forked from Minki/linux
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
@ -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 New Issue
Block a user