]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
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)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 2 Jul 2019 10:07:53 +0000 (12:07 +0200)
commit8c866f0bf3ac035177b986582e7264c7264da15b
tree861dc80a2538a53cf221e718367356e7c2a3436c
parente014ab27da2e88f115037788436944050bee4cb6
Input: snvs_pwrkey - initialize necessary driver data before enabling IRQ

BugLink: https://bugs.launchpad.net/bugs/1832775
commit bf2a7ca39fd3ab47ef71c621a7ee69d1813b1f97 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Connor Kuehl <connor.kuehl@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/input/keyboard/snvs_pwrkey.c