From: Wim Van Sebroeck Date: Tue, 27 Apr 2010 08:24:11 +0000 (+0000) Subject: watchdog: booke_wdt: fix ioctl status flags X-Git-Tag: v2.6.35-rc1~269^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8b18085a92c72fe1754481890e9dfc600e736b1f;p=profile%2Fivi%2Fkernel-x86-ivi.git 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 --- diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 801ead1..3d49671 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;