diff options
author | Wim Van Sebroeck <wim@iguana.be> | 2010-04-27 10:24:11 +0200 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2010-05-25 11:04:06 +0200 |
commit | 8b18085a92c72fe1754481890e9dfc600e736b1f (patch) | |
tree | c9f4f2178631dd536404c43fd8aa3c382b9090b5 /drivers | |
parent | watchdog: fix several MODULE_PARM_DESC strings (diff) | |
download | linux-8b18085a92c72fe1754481890e9dfc600e736b1f.tar.xz linux-8b18085a92c72fe1754481890e9dfc600e736b1f.zip |
watchdog: booke_wdt: fix ioctl status flags
The WDIOC_GETSTATUS & WDIOC_GETBOOTSTATUS ioctl calls return the WDIOF_* flags
and nothing else.
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/watchdog/booke_wdt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 801ead191499..3d49671cdf5a 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c @@ -137,12 +137,12 @@ static long booke_wdt_ioctl(struct file *file, if (copy_to_user((void *)arg, &ident, sizeof(ident))) return -EFAULT; case WDIOC_GETSTATUS: - return put_user(ident.options, p); + return put_user(0, p); case WDIOC_GETBOOTSTATUS: /* XXX: something is clearing TSR */ tmp = mfspr(SPRN_TSR) & TSR_WRS(3); - /* returns 1 if last reset was caused by the WDT */ - return (tmp ? 1 : 0); + /* returns CARDRESET if last reset was caused by the WDT */ + return (tmp ? WDIOF_CARDRESET : 0); case WDIOC_SETOPTIONS: if (get_user(tmp, p)) return -EINVAL; |