]> git.baikalelectronics.ru Git - kernel.git/commit
Input: max8925_onkey - avoid accessing input device too early
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 6 Mar 2012 17:10:21 +0000 (09:10 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Tue, 6 Mar 2012 19:03:30 +0000 (11:03 -0800)
commit383f70d76b073a12b0919aec902e22ebc16b0cf3
treec64b1a3c71e5688631fbdbbd07e59f025066269f
parent541b073358074ae173575e7d542d0cdc94d3e39f
Input: max8925_onkey - avoid accessing input device too early

Input device must be allocated (but not necessarily registered) before
requesting IRQs, otherwise there is a chance that IRQ handler fires and
tries to reference not yet allocated input device.

Also it makes sense to store relative IRQ numbers in max8925_onkey_info
structure as they are needed in suspend/resume which we expect to be
called more often than probe and remove.

Acked-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/misc/max8925_onkey.c