]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/watchdog/pnx4008_wdt.c
Merge branch 'next' into for-linus
[karo-tx-linux.git] / drivers / watchdog / pnx4008_wdt.c
index 8cd0d53941e787e9bc7137b57e91355c004539ae..6d9f3d4a9987342f5900ba43200b8c447035c6d5 100644 (file)
 #include <linux/platform_device.h>
 #include <linux/clk.h>
 #include <linux/spinlock.h>
-
-#include <asm/hardware.h>
 #include <linux/uaccess.h>
 #include <linux/io.h>
+#include <mach/hardware.h>
 
 #define MODULE_NAME "PNX4008-WDT: "
 
@@ -174,8 +173,8 @@ static const struct watchdog_info ident = {
        .identity = "PNX4008 Watchdog",
 };
 
-static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file,
-                                       unsigned int cmd, unsigned long arg)
+static long pnx4008_wdt_ioctl(struct file *file, unsigned int cmd,
+                               unsigned long arg)
 {
        int ret = -ENOTTY;
        int time;
@@ -194,6 +193,11 @@ static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file,
                ret = put_user(boot_status, (int *)arg);
                break;
 
+       case WDIOC_KEEPALIVE:
+               wdt_enable();
+               ret = 0;
+               break;
+
        case WDIOC_SETTIMEOUT:
                ret = get_user(time, (int *)arg);
                if (ret)
@@ -211,11 +215,6 @@ static long pnx4008_wdt_ioctl(struct inode *inode, struct file *file,
        case WDIOC_GETTIMEOUT:
                ret = put_user(heartbeat, (int *)arg);
                break;
-
-       case WDIOC_KEEPALIVE:
-               wdt_enable();
-               ret = 0;
-               break;
        }
        return ret;
 }