Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ
authorAnson Huang <anson.huang@nxp.com>
Wed, 3 Apr 2019 22:14:44 +0000 (15:14 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 3 Apr 2019 23:10:57 +0000 (16:10 -0700)
commitbf2a7ca39fd3ab47ef71c621a7ee69d1813b1f97
treea8115e33a4c7b44725cf1fc2150d968a828d2b42
parentc01908a14bf735b871170092807c618bb9dae654
Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ

SNVS IRQ is requested before necessary driver data initialized,
if there is a pending IRQ during driver probe phase, kernel
NULL pointer panic will occur in IRQ handler. To avoid such
scenario, just initialize necessary driver data before enabling
IRQ. This patch is inspired by NXP's internal kernel tree.

Fixes: d3dc6e232215 ("input: keyboard: imx: add snvs power key driver")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/keyboard/snvs_pwrkey.c