watchdog: f71808e_wdt: Fix magic close handling
authorIgor Pylypiv <igor.pylypiv@gmail.com>
Wed, 28 Feb 2018 08:59:12 +0000 (00:59 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 05:52:10 +0000 (07:52 +0200)
commit49995a2931bba15fd53879ec3c8116f6d3644dca
tree1efbe29c28a305506425b007e04fa092bb9f91d0
parent266675ab52db3cfbf1de8747d9cf1445dafbc436
watchdog: f71808e_wdt: Fix magic close handling

[ Upstream commit 7bd3e7b743956afbec30fb525bc3c5e22e3d475c ]

Watchdog close is "expected" when any byte is 'V' not just the last one.
Writing "V" to the device fails because the last byte is the end of string.

$ echo V > /dev/watchdog
f71808e_wdt: Unexpected close, not stopping watchdog!

Signed-off-by: Igor Pylypiv <igor.pylypiv@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/watchdog/f71808e_wdt.c