aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/watchdog
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char/watchdog')
-rw-r--r--drivers/char/watchdog/at32ap700x_wdt.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/char/watchdog/at32ap700x_wdt.c b/drivers/char/watchdog/at32ap700x_wdt.c
index 036d83bcb50c..588b26d400cd 100644
--- a/drivers/char/watchdog/at32ap700x_wdt.c
+++ b/drivers/char/watchdog/at32ap700x_wdt.c
@@ -16,9 +16,8 @@
16#include <linux/fs.h> 16#include <linux/fs.h>
17#include <linux/platform_device.h> 17#include <linux/platform_device.h>
18#include <linux/watchdog.h> 18#include <linux/watchdog.h>
19 19#include <linux/uaccess.h>
20#include <asm/uaccess.h> 20#include <linux/io.h>
21#include <asm/io.h>
22 21
23#define TIMEOUT_MIN 1 22#define TIMEOUT_MIN 1
24#define TIMEOUT_DEFAULT CONFIG_AT32AP700X_WDT_TIMEOUT 23#define TIMEOUT_DEFAULT CONFIG_AT32AP700X_WDT_TIMEOUT
@@ -120,7 +119,10 @@ static int at32_wdt_settimeout(int time)
120 if ((time < TIMEOUT_MIN) || (time > TIMEOUT_MAX)) 119 if ((time < TIMEOUT_MIN) || (time > TIMEOUT_MAX))
121 return -EINVAL; 120 return -EINVAL;
122 121
123 /* Set new watchdog time. It will be used when at32_wdt_start() is called. */ 122 /*
123 * Set new watchdog time. It will be used when at32_wdt_start() is
124 * called.
125 */
124 wdt->timeout = time; 126 wdt->timeout = time;
125 return 0; 127 return 0;
126} 128}
@@ -141,7 +143,7 @@ static int at32_wdt_ioctl(struct inode *inode, struct file *file,
141 void __user *argp = (void __user *)arg; 143 void __user *argp = (void __user *)arg;
142 int __user *p = argp; 144 int __user *p = argp;
143 145
144 switch(cmd) { 146 switch (cmd) {
145 case WDIOC_KEEPALIVE: 147 case WDIOC_KEEPALIVE:
146 at32_wdt_pat(); 148 at32_wdt_pat();
147 ret = 0; 149 ret = 0;
@@ -182,7 +184,8 @@ static int at32_wdt_ioctl(struct inode *inode, struct file *file,
182 return ret; 184 return ret;
183} 185}
184 186
185static ssize_t at32_wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos) 187static ssize_t at32_wdt_write(struct file *file, const char *data, size_t len,
188 loff_t *ppos)
186{ 189{
187 at32_wdt_pat(); 190 at32_wdt_pat();
188 return len; 191 return len;