fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / drivers / char / watchdog / scx200_wdt.c
index b569670..fc0e034 100644 (file)
@@ -17,7 +17,6 @@
    of any nature resulting due to the use of this software. This
    software is provided AS-IS with no warranties. */
 
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/moduleparam.h>
 #include <linux/init.h>
@@ -39,15 +38,11 @@ MODULE_DESCRIPTION("NatSemi SCx200 Watchdog Driver");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS_MISCDEV(WATCHDOG_MINOR);
 
-#ifndef CONFIG_WATCHDOG_NOWAYOUT
-#define CONFIG_WATCHDOG_NOWAYOUT 0
-#endif
-
 static int margin = 60;                /* in seconds */
 module_param(margin, int, 0);
 MODULE_PARM_DESC(margin, "Watchdog margin in seconds");
 
-static int nowayout = CONFIG_WATCHDOG_NOWAYOUT;
+static int nowayout = WATCHDOG_NOWAYOUT;
 module_param(nowayout, int, 0);
 MODULE_PARM_DESC(nowayout, "Disable watchdog shutdown on close");
 
@@ -171,7 +166,7 @@ static int scx200_wdt_ioctl(struct inode *inode, struct file *file,
 
        switch (cmd) {
        default:
-               return -ENOIOCTLCMD;
+               return -ENOTTY;
        case WDIOC_GETSUPPORT:
                if(copy_to_user(argp, &ident, sizeof(ident)))
                        return -EFAULT;
@@ -199,7 +194,7 @@ static int scx200_wdt_ioctl(struct inode *inode, struct file *file,
        }
 }
 
-static struct file_operations scx200_wdt_fops = {
+static const struct file_operations scx200_wdt_fops = {
        .owner   = THIS_MODULE,
        .llseek  = no_llseek,
        .write   = scx200_wdt_write,
@@ -210,7 +205,7 @@ static struct file_operations scx200_wdt_fops = {
 
 static struct miscdevice scx200_wdt_miscdev = {
        .minor = WATCHDOG_MINOR,
-       .name  = NAME,
+       .name  = "watchdog",
        .fops  = &scx200_wdt_fops,
 };