]> rtime.felk.cvut.cz Git - hercules2020/nv-tegra/linux-4.4.git/commit
watchdog: t21x: Remove WDT IRQ handler only once
authorShreshtha SAHU <ssahu@nvidia.com>
Tue, 2 Jan 2018 06:32:04 +0000 (12:02 +0530)
committerWinnie Hsu <whsu@nvidia.com>
Sat, 3 Feb 2018 02:56:05 +0000 (18:56 -0800)
commit1863b7a0362a9609c6a295b2beec21fdab53a9d6
tree9b9fe6640c6284a56c4bc6ff74bc35cbec3d0264
parent607c18a2cf6feec5338e6bdab054e7e1082a4a29
watchdog: t21x: Remove WDT IRQ handler only once

WDT IRQ is requested when WDT daemon is started early
during kernel boot. WDT daemon is stopped when user
space opens /dev/watchdog and then WDT IRQ is also freed.

If user space open/close /dev/watchdog multiple times,
then WDT IRQ free is getting called each time, even though
WDT daemon was already disabled first time user space
started watchdog.

To prevent this multiple free, IRQ free is moved to driver
remove. Also when user space is taking over WDT ping, IRQ is
disabled to stop WDT daemon from pinging WDT.

Bug 1976162

Change-Id: Iae2b8f78311f1f012b4d4078100662295472f069
Signed-off-by: Shreshtha SAHU <ssahu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1629847
(cherry picked from commit c7d7331a7cbaf0194c31a5a7de8cb4961e3df245)
Reviewed-on: https://git-master.nvidia.com/r/1651378
Reviewed-by: Winnie Hsu <whsu@nvidia.com>
Tested-by: Winnie Hsu <whsu@nvidia.com>
drivers/watchdog/tegra_wdt.c