diff options
author | Olof Johansson <olof@lixom.net> | 2012-09-12 22:34:11 -0700 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2012-09-12 22:34:11 -0700 |
commit | 025c95a6826ad8acfe871f33c2fa9208beeb38df (patch) | |
tree | 220fe156ff60db13bd3a1319f5e20d6b723de5f4 /drivers/watchdog/booke_wdt.c | |
parent | 0558d7a8ed44e6e53aadb04d2e23145efb2aa8a4 (diff) | |
parent | 7f744b17140af1a9c8804a1c81c9dae6bb52a7fb (diff) |
Merge branch 'clk' of git://github.com/hzhuang1/linux into next/cleanup
* 'clk' of git://github.com/hzhuang1/linux:
ARM: mmp: remove unused definition in APBC and APMU
ARM: mmp: move mmp2 clock definition to separated file
arm: mmp: move pxa910 clock definition to separated file
arm: mmp: move pxa168 clock definition to separated file
arm: mmp: make private clock definition exclude from common clock
+ Linux 3.6-rc4
Diffstat (limited to 'drivers/watchdog/booke_wdt.c')
-rw-r--r-- | drivers/watchdog/booke_wdt.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c index 3fe82d0e8caa..5b06d31ab6a9 100644 --- a/drivers/watchdog/booke_wdt.c +++ b/drivers/watchdog/booke_wdt.c @@ -166,18 +166,17 @@ static long booke_wdt_ioctl(struct file *file, switch (cmd) { case WDIOC_GETSUPPORT: - if (copy_to_user((void *)arg, &ident, sizeof(ident))) - return -EFAULT; + return copy_to_user(p, &ident, sizeof(ident)) ? -EFAULT : 0; case WDIOC_GETSTATUS: return put_user(0, p); case WDIOC_GETBOOTSTATUS: /* XXX: something is clearing TSR */ tmp = mfspr(SPRN_TSR) & TSR_WRS(3); /* returns CARDRESET if last reset was caused by the WDT */ - return (tmp ? WDIOF_CARDRESET : 0); + return put_user((tmp ? WDIOF_CARDRESET : 0), p); case WDIOC_SETOPTIONS: if (get_user(tmp, p)) - return -EINVAL; + return -EFAULT; if (tmp == WDIOS_ENABLECARD) { booke_wdt_ping(); break; |