diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-06-07 19:06:43 -0400 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2007-06-10 15:58:00 -0400 |
commit | c37f271320d595f46beb5a0ab7833107f461f6b6 (patch) | |
tree | 2cc682671ee8cf455c105f5776bf165634314eeb /drivers/char | |
parent | a9cb3959ace112295fdb65c99a2928eedba06926 (diff) |
[WATCHDOG] watchdog-driver-for-at32ap700x-devices-fix
little fiddles.
Cc: Haavard Skinnemoen <hskinnemoen@atmel.com>
Cc: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/char')
-rw-r--r-- | drivers/char/watchdog/at32ap700x_wdt.c | 15 |
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 | ||
185 | static ssize_t at32_wdt_write(struct file *file, const char *data, size_t len, loff_t *ppos) | 187 | static 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; |