summaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
authorOlof Johansson <olof@lixom.net>2012-09-12 22:34:11 -0700
committerOlof Johansson <olof@lixom.net>2012-09-12 22:34:11 -0700
commit025c95a6826ad8acfe871f33c2fa9208beeb38df (patch)
tree220fe156ff60db13bd3a1319f5e20d6b723de5f4 /drivers/watchdog
parent0558d7a8ed44e6e53aadb04d2e23145efb2aa8a4 (diff)
parent7f744b17140af1a9c8804a1c81c9dae6bb52a7fb (diff)
downloadop-kernel-dev-025c95a6826ad8acfe871f33c2fa9208beeb38df.zip
op-kernel-dev-025c95a6826ad8acfe871f33c2fa9208beeb38df.tar.gz
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')
-rw-r--r--drivers/watchdog/booke_wdt.c7
-rw-r--r--drivers/watchdog/da9052_wdt.c1
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/watchdog/booke_wdt.c b/drivers/watchdog/booke_wdt.c
index 3fe82d0..5b06d31 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;
diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c
index 3f75129..f7abbae 100644
--- a/drivers/watchdog/da9052_wdt.c
+++ b/drivers/watchdog/da9052_wdt.c
@@ -21,7 +21,6 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/jiffies.h>
-#include <linux/delay.h>
#include <linux/mfd/da9052/reg.h>
#include <linux/mfd/da9052/da9052.h>
OpenPOWER on IntegriCloud