aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/watchdog
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/watchdog')
-rw-r--r--drivers/watchdog/booke_wdt.c7
-rw-r--r--drivers/watchdog/da9052_wdt.c1
-rw-r--r--drivers/watchdog/mpc8xxx_wdt.c2
3 files changed, 4 insertions, 6 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,
166 166
167 switch (cmd) { 167 switch (cmd) {
168 case WDIOC_GETSUPPORT: 168 case WDIOC_GETSUPPORT:
169 if (copy_to_user((void *)arg, &ident, sizeof(ident))) 169 return copy_to_user(p, &ident, sizeof(ident)) ? -EFAULT : 0;
170 return -EFAULT;
171 case WDIOC_GETSTATUS: 170 case WDIOC_GETSTATUS:
172 return put_user(0, p); 171 return put_user(0, p);
173 case WDIOC_GETBOOTSTATUS: 172 case WDIOC_GETBOOTSTATUS:
174 /* XXX: something is clearing TSR */ 173 /* XXX: something is clearing TSR */
175 tmp = mfspr(SPRN_TSR) & TSR_WRS(3); 174 tmp = mfspr(SPRN_TSR) & TSR_WRS(3);
176 /* returns CARDRESET if last reset was caused by the WDT */ 175 /* returns CARDRESET if last reset was caused by the WDT */
177 return (tmp ? WDIOF_CARDRESET : 0); 176 return put_user((tmp ? WDIOF_CARDRESET : 0), p);
178 case WDIOC_SETOPTIONS: 177 case WDIOC_SETOPTIONS:
179 if (get_user(tmp, p)) 178 if (get_user(tmp, p))
180 return -EINVAL; 179 return -EFAULT;
181 if (tmp == WDIOS_ENABLECARD) { 180 if (tmp == WDIOS_ENABLECARD) {
182 booke_wdt_ping(); 181 booke_wdt_ping();
183 break; 182 break;
diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c
index 3f75129eb0a9..f7abbaeebcaf 100644
--- a/drivers/watchdog/da9052_wdt.c
+++ b/drivers/watchdog/da9052_wdt.c
@@ -21,7 +21,6 @@
21#include <linux/types.h> 21#include <linux/types.h>
22#include <linux/kernel.h> 22#include <linux/kernel.h>
23#include <linux/jiffies.h> 23#include <linux/jiffies.h>
24#include <linux/delay.h>
25 24
26#include <linux/mfd/da9052/reg.h> 25#include <linux/mfd/da9052/reg.h>
27#include <linux/mfd/da9052/da9052.h> 26#include <linux/mfd/da9052/da9052.h>
diff --git a/drivers/watchdog/mpc8xxx_wdt.c b/drivers/watchdog/mpc8xxx_wdt.c
index 40f7bf1f8654..e6a038ae8dc2 100644
--- a/drivers/watchdog/mpc8xxx_wdt.c
+++ b/drivers/watchdog/mpc8xxx_wdt.c
@@ -193,7 +193,7 @@ static int __devinit mpc8xxx_wdt_probe(struct platform_device *ofdev)
193 int ret; 193 int ret;
194 const struct of_device_id *match; 194 const struct of_device_id *match;
195 struct device_node *np = ofdev->dev.of_node; 195 struct device_node *np = ofdev->dev.of_node;
196 struct mpc8xxx_wdt_type *wdt_type; 196 const struct mpc8xxx_wdt_type *wdt_type;
197 u32 freq = fsl_get_sys_freq(); 197 u32 freq = fsl_get_sys_freq();
198 bool enabled; 198 bool enabled;
199 199