]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/watchdog/s3c2410_wdt.c
[PATCH] vt: Make vt_pid a struct pid (making it pid wrap around safe).
[linux-2.6-omap-h63xx.git] / drivers / char / watchdog / s3c2410_wdt.c
index 9dc54736e4eb627d5e843bda4e2bc2a243aa0840..be978e8ed754941fa215bc5864e72e8e3bb258ea 100644 (file)
@@ -37,7 +37,6 @@
 
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/timer.h>
 #include <linux/miscdevice.h>
@@ -320,7 +319,7 @@ static int s3c2410wdt_ioctl(struct inode *inode, struct file *file,
 
 /* kernel interface */
 
-static struct file_operations s3c2410wdt_fops = {
+static const struct file_operations s3c2410wdt_fops = {
        .owner          = THIS_MODULE,
        .llseek         = no_llseek,
        .write          = s3c2410wdt_write,
@@ -423,6 +422,12 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
        if (tmr_atboot && started == 0) {
                printk(KERN_INFO PFX "Starting Watchdog Timer\n");
                s3c2410wdt_start();
+       } else if (!tmr_atboot) {
+               /* if we're not enabling the watchdog, then ensure it is
+                * disabled if it has been left running from the bootloader
+                * or other source */
+
+               s3c2410wdt_stop();
        }
 
        return 0;