diff options
Diffstat (limited to 'drivers/watchdog/mv64x60_wdt.c')
-rw-r--r-- | drivers/watchdog/mv64x60_wdt.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/watchdog/mv64x60_wdt.c b/drivers/watchdog/mv64x60_wdt.c index b59ca327396..acf589dc057 100644 --- a/drivers/watchdog/mv64x60_wdt.c +++ b/drivers/watchdog/mv64x60_wdt.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * and services the watchdog. | 8 | * and services the watchdog. |
9 | * | 9 | * |
10 | * Derived from mpc8xx_wdt.c, with the following copyright. | 10 | * Derived from mpc8xx_wdt.c, with the following copyright. |
11 | * | 11 | * |
12 | * 2002 (c) Florian Schirmer <jolt@tuxbox.org> This file is licensed under | 12 | * 2002 (c) Florian Schirmer <jolt@tuxbox.org> This file is licensed under |
13 | * the terms of the GNU General Public License version 2. This program | 13 | * the terms of the GNU General Public License version 2. This program |
14 | * is licensed "as is" without any warranty of any kind, whether express | 14 | * is licensed "as is" without any warranty of any kind, whether express |
@@ -22,10 +22,9 @@ | |||
22 | #include <linux/module.h> | 22 | #include <linux/module.h> |
23 | #include <linux/watchdog.h> | 23 | #include <linux/watchdog.h> |
24 | #include <linux/platform_device.h> | 24 | #include <linux/platform_device.h> |
25 | |||
26 | #include <linux/mv643xx.h> | 25 | #include <linux/mv643xx.h> |
27 | #include <asm/uaccess.h> | 26 | #include <linux/uaccess.h> |
28 | #include <asm/io.h> | 27 | #include <linux/io.h> |
29 | 28 | ||
30 | #define MV64x60_WDT_WDC_OFFSET 0 | 29 | #define MV64x60_WDT_WDC_OFFSET 0 |
31 | 30 | ||
@@ -61,7 +60,9 @@ static DEFINE_SPINLOCK(mv64x60_wdt_spinlock); | |||
61 | 60 | ||
62 | static int nowayout = WATCHDOG_NOWAYOUT; | 61 | static int nowayout = WATCHDOG_NOWAYOUT; |
63 | module_param(nowayout, int, 0); | 62 | module_param(nowayout, int, 0); |
64 | MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=" __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | 63 | MODULE_PARM_DESC(nowayout, |
64 | "Watchdog cannot be stopped once started (default=" | ||
65 | __MODULE_STRING(WATCHDOG_NOWAYOUT) ")"); | ||
65 | 66 | ||
66 | static int mv64x60_wdt_toggle_wdc(int enabled_predicate, int field_shift) | 67 | static int mv64x60_wdt_toggle_wdc(int enabled_predicate, int field_shift) |
67 | { | 68 | { |
@@ -150,7 +151,7 @@ static int mv64x60_wdt_release(struct inode *inode, struct file *file) | |||
150 | } | 151 | } |
151 | 152 | ||
152 | static ssize_t mv64x60_wdt_write(struct file *file, const char __user *data, | 153 | static ssize_t mv64x60_wdt_write(struct file *file, const char __user *data, |
153 | size_t len, loff_t * ppos) | 154 | size_t len, loff_t *ppos) |
154 | { | 155 | { |
155 | if (len) { | 156 | if (len) { |
156 | if (!nowayout) { | 157 | if (!nowayout) { |
@@ -160,7 +161,7 @@ static ssize_t mv64x60_wdt_write(struct file *file, const char __user *data, | |||
160 | 161 | ||
161 | for (i = 0; i != len; i++) { | 162 | for (i = 0; i != len; i++) { |
162 | char c; | 163 | char c; |
163 | if(get_user(c, data + i)) | 164 | if (get_user(c, data + i)) |
164 | return -EFAULT; | 165 | return -EFAULT; |
165 | if (c == 'V') | 166 | if (c == 'V') |
166 | expect_close = 42; | 167 | expect_close = 42; |
@@ -172,8 +173,8 @@ static ssize_t mv64x60_wdt_write(struct file *file, const char __user *data, | |||
172 | return len; | 173 | return len; |
173 | } | 174 | } |
174 | 175 | ||
175 | static int mv64x60_wdt_ioctl(struct inode *inode, struct file *file, | 176 | static long mv64x60_wdt_ioctl(struct file *file, |
176 | unsigned int cmd, unsigned long arg) | 177 | unsigned int cmd, unsigned long arg) |
177 | { | 178 | { |
178 | int timeout; | 179 | int timeout; |
179 | int options; | 180 | int options; |
@@ -240,7 +241,7 @@ static const struct file_operations mv64x60_wdt_fops = { | |||
240 | .owner = THIS_MODULE, | 241 | .owner = THIS_MODULE, |
241 | .llseek = no_llseek, | 242 | .llseek = no_llseek, |
242 | .write = mv64x60_wdt_write, | 243 | .write = mv64x60_wdt_write, |
243 | .ioctl = mv64x60_wdt_ioctl, | 244 | .unlocked_ioctl = mv64x60_wdt_ioctl, |
244 | .open = mv64x60_wdt_open, | 245 | .open = mv64x60_wdt_open, |
245 | .release = mv64x60_wdt_release, | 246 | .release = mv64x60_wdt_release, |
246 | }; | 247 | }; |