diff options
Diffstat (limited to 'drivers/watchdog/advantechwdt.c')
-rw-r--r-- | drivers/watchdog/advantechwdt.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/watchdog/advantechwdt.c b/drivers/watchdog/advantechwdt.c index bfec16600475..a5110f93a755 100644 --- a/drivers/watchdog/advantechwdt.c +++ b/drivers/watchdog/advantechwdt.c | |||
@@ -47,7 +47,8 @@ | |||
47 | #define WATCHDOG_NAME "Advantech WDT" | 47 | #define WATCHDOG_NAME "Advantech WDT" |
48 | #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ | 48 | #define WATCHDOG_TIMEOUT 60 /* 60 sec default timeout */ |
49 | 49 | ||
50 | static struct platform_device *advwdt_platform_device; /* the watchdog platform device */ | 50 | /* the watchdog platform device */ |
51 | static struct platform_device *advwdt_platform_device; | ||
51 | static unsigned long advwdt_is_open; | 52 | static unsigned long advwdt_is_open; |
52 | static char adv_expect_close; | 53 | static char adv_expect_close; |
53 | 54 | ||
@@ -120,7 +121,7 @@ static ssize_t advwdt_write(struct file *file, const char __user *buf, | |||
120 | 121 | ||
121 | for (i = 0; i != count; i++) { | 122 | for (i = 0; i != count; i++) { |
122 | char c; | 123 | char c; |
123 | if (get_user(c, buf+i)) | 124 | if (get_user(c, buf + i)) |
124 | return -EFAULT; | 125 | return -EFAULT; |
125 | if (c == 'V') | 126 | if (c == 'V') |
126 | adv_expect_close = 42; | 127 | adv_expect_close = 42; |
@@ -199,8 +200,7 @@ static int advwdt_open(struct inode *inode, struct file *file) | |||
199 | return nonseekable_open(inode, file); | 200 | return nonseekable_open(inode, file); |
200 | } | 201 | } |
201 | 202 | ||
202 | static int | 203 | static int advwdt_close(struct inode *inode, struct file *file) |
203 | advwdt_close(struct inode *inode, struct file *file) | ||
204 | { | 204 | { |
205 | if (adv_expect_close == 42) { | 205 | if (adv_expect_close == 42) { |
206 | advwdt_disable(); | 206 | advwdt_disable(); |
@@ -288,9 +288,9 @@ unreg_stop: | |||
288 | static int __devexit advwdt_remove(struct platform_device *dev) | 288 | static int __devexit advwdt_remove(struct platform_device *dev) |
289 | { | 289 | { |
290 | misc_deregister(&advwdt_miscdev); | 290 | misc_deregister(&advwdt_miscdev); |
291 | release_region(wdt_start,1); | 291 | release_region(wdt_start, 1); |
292 | if(wdt_stop != wdt_start) | 292 | if (wdt_stop != wdt_start) |
293 | release_region(wdt_stop,1); | 293 | release_region(wdt_stop, 1); |
294 | 294 | ||
295 | return 0; | 295 | return 0; |
296 | } | 296 | } |
@@ -315,7 +315,8 @@ static int __init advwdt_init(void) | |||
315 | { | 315 | { |
316 | int err; | 316 | int err; |
317 | 317 | ||
318 | printk(KERN_INFO "WDT driver for Advantech single board computer initialising.\n"); | 318 | printk(KERN_INFO |
319 | "WDT driver for Advantech single board computer initialising.\n"); | ||
319 | 320 | ||
320 | err = platform_driver_register(&advwdt_driver); | 321 | err = platform_driver_register(&advwdt_driver); |
321 | if (err) | 322 | if (err) |