[lkml]   [2012]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH] watchdog: fix GETTIMEOUT ioctl in booke_wdt
Commit dcfb748422 ([WATCHDOG] fix book E watchdog to take
WDIOC_SETTIMEOUT arg in seconds) fixed SETTIMEOUT ioctl
to use seconds as a parameter instead of some hardware-specific
"period", but missed to apply similar changes to GETTIMEOUT,
so it still returns "period" value. Let's fix it!
Also, while at it, make SETTIMEOUT ioctl return real timeout
value as it should do according to the documentation.

Signed-off-by: Dmitry Artamonow <>
drivers/watchdog/booke_wdt.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)

I'm no longer have a hardware, so it haven't been tested actually.
It would be nice if anyone could test it on some BookE platform.

diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 337265b..7c0fdfc 100644
--- a/drivers/watchdog/booke_wdt.c
+++ b/drivers/watchdog/booke_wdt.c
@@ -198,9 +198,13 @@ static long booke_wdt_ioctl(struct file *file,
booke_wdt_period = tmp;
- return 0;
+ /* Fall */
+ return put_user(period_to_sec(booke_wdt_period), p);
return put_user(booke_wdt_period, p);
return -ENOTTY;

 \ /
  Last update: 2012-01-26 20:33    [W:0.048 / U:6.740 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site