]> git.baikalelectronics.ru Git - kernel.git/commit
watchdog: core: fix WDIOC_GETSTATUS return value
authorWim Van Sebroeck <wim@iguana.be>
Tue, 26 Jun 2012 18:07:21 +0000 (20:07 +0200)
committerWim Van Sebroeck <wim@iguana.be>
Thu, 28 Jun 2012 18:40:56 +0000 (20:40 +0200)
commitd7634384c59147e37e68633a790b54b12a329e62
tree31e7d3ebbaf94183dc442cbc1628831d2b5cdc40
parent7036c94bbe68f8ae9c21bd874a40eaeee281ea1b
watchdog: core: fix WDIOC_GETSTATUS return value

In commit 7f59bf17db2680f96fb4654b7057dea66ceb3ef2 we added
a wrapper for the WDIOC_GETSTATUS ioctl call. The code results
however in a different behaviour: it returns an error if the
driver doesn't support the status operation. This is not
according to the API that says that when we don't support
the status operation, that we just should return a 0 value.
Only when the device isn't there anymore, we should return an
error.

Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/watchdog_dev.c