Input: zinitix - make sure the IRQ is allocated before it gets enabled
authorNikita Travkin <nikita@trvn.ru>
Sun, 9 Jan 2022 07:19:19 +0000 (23:19 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Jan 2022 14:35:19 +0000 (15:35 +0100)
commitb228924bb6191ce20cf66c0859e5a41c53709ab9
treecd8371776469ba9c23b60830aa136d1c98e5dfb3
parent1917ace183751aea82e6c56fdfa9a5b0070d65c3
Input: zinitix - make sure the IRQ is allocated before it gets enabled

[ Upstream commit cf73ed894ee939d6706d65e0cd186e4a64e3af6d ]

Since irq request is the last thing in the driver probe, it happens
later than the input device registration. This means that there is a
small time window where if the open method is called the driver will
attempt to enable not yet available irq.

Fix that by moving the irq request before the input device registration.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Fixes: 26822652c85e ("Input: add zinitix touchscreen driver")
Signed-off-by: Nikita Travkin <nikita@trvn.ru>
Link: https://lore.kernel.org/r/20220106072840.36851-2-nikita@trvn.ru
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/touchscreen/zinitix.c