--- /dev/null
+++ b/drivers/watchdog/ar2315-wtd.c
-@@ -0,0 +1,199 @@
+@@ -0,0 +1,197 @@
+/*
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+#include <ar231x.h>
+
+#define CLOCK_RATE 40000000
-+#define HEARTBEAT(x) (x < 1 || x > 90)?(20):(x)
++#define HEARTBEAT(x) (x < 1 || x > 90 ? 20 : x)
+
+static int wdt_timeout = 20;
-+static int started = 0;
-+static int in_use = 0;
++static int started;
++static int in_use;
+
+static void
+ar2315_wdt_enable(void)
+static irqreturn_t
+ar2315_wdt_interrupt(int irq, void *dev_id)
+{
-+ if(started)
-+ {
++ if (started) {
+ printk(KERN_CRIT "watchdog expired, rebooting system\n");
+ emergency_restart();
+ } else {
+ int new_wdt_timeout;
+ int ret = -ENOIOCTLCMD;
+
-+ switch(cmd)
-+ {
++ switch (cmd) {
+ case WDIOC_GETSUPPORT:
+ ret = copy_to_user((struct watchdog_info __user *)arg, &ident, sizeof(ident)) ? -EFAULT : 0;
+ break;
+ break;
+
+ case WDIOC_SETTIMEOUT:
-+ if((ret = get_user(new_wdt_timeout, (int __user *)arg)))
++ ret = get_user(new_wdt_timeout, (int __user *)arg);
++ if (ret)
+ break;
+ wdt_timeout = HEARTBEAT(new_wdt_timeout);
+ ar2315_wdt_enable();
+
+ ar2315_wdt_enable();
+ ret = request_irq(AR531X_MISC_IRQ_WATCHDOG, ar2315_wdt_interrupt, IRQF_DISABLED, "ar2315_wdt", NULL);
-+ if(ret)
-+ {
++ if (ret) {
+ printk(KERN_ERR "ar2315wdt: failed to register inetrrupt\n");
+ goto out;
+ }