]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/watchdog/omap_wdt.c
[PATCH] rt2x00: Remove radio check from rt2x00lib_toggle_rx
[linux-2.6-omap-h63xx.git] / drivers / char / watchdog / omap_wdt.c
index 5dbd7dc2936f73981ef889dcb1840aee9b496b84..719b066f73c41cd8cbf655d7f2afa0c7ad81e774 100644 (file)
@@ -34,7 +34,6 @@
 #include <linux/miscdevice.h>
 #include <linux/watchdog.h>
 #include <linux/reboot.h>
-#include <linux/smp_lock.h>
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/platform_device.h>
@@ -143,7 +142,7 @@ static int omap_wdt_open(struct inode *inode, struct file *file)
 
        omap_wdt_set_timeout();
        omap_wdt_enable();
-       return 0;
+       return nonseekable_open(inode, file);
 }
 
 static int omap_wdt_release(struct inode *inode, struct file *file)
@@ -198,7 +197,7 @@ omap_wdt_ioctl(struct inode *inode, struct file *file,
 
        switch (cmd) {
        default:
-               return -ENOIOCTLCMD;
+               return -ENOTTY;
        case WDIOC_GETSUPPORT:
                return copy_to_user((struct watchdog_info __user *)arg, &ident,
                                sizeof(ident));
@@ -230,7 +229,7 @@ omap_wdt_ioctl(struct inode *inode, struct file *file,
        }
 }
 
-static struct file_operations omap_wdt_fops = {
+static const struct file_operations omap_wdt_fops = {
        .owner = THIS_MODULE,
        .write = omap_wdt_write,
        .ioctl = omap_wdt_ioctl,
@@ -290,7 +289,7 @@ static int __init omap_wdt_probe(struct platform_device *pdev)
        omap_wdt_disable();
        omap_wdt_adjust_timeout(timer_margin);
 
-       omap_wdt_miscdev.dev = &pdev->dev;
+       omap_wdt_miscdev.parent = &pdev->dev;
        ret = misc_register(&omap_wdt_miscdev);
        if (ret)
                goto fail;