add feature gpio
[lede.git] / target / linux / ramips / files / drivers / watchdog / ramips_wdt.c
index a0b56c8cb1ad75548f6fa1b547cd00ec5c275889..fa7e9e85ef7d927e0045a04999e780806fe82047 100644 (file)
@@ -33,7 +33,7 @@
 
 #define DRIVER_NAME    "ramips-wdt"
 
-#define RAMIPS_WDT_TIMEOUT             20      /* seconds */
+#define RAMIPS_WDT_TIMEOUT                   /* seconds */
 #define RAMIPS_WDT_PRESCALE            65536
 
 #define TIMER_REG_TMRSTAT              0x00
@@ -59,7 +59,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started "
 
 static int ramips_wdt_timeout = RAMIPS_WDT_TIMEOUT;
 module_param_named(timeout, ramips_wdt_timeout, int, 0);
-MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds "
+MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds, 0 means use maximum "
                          "(default=" __MODULE_STRING(RAMIPS_WDT_TIMEOUT) "s)");
 
 static unsigned long ramips_wdt_flags;
@@ -112,9 +112,9 @@ static inline void ramips_wdt_disable(void)
 static int ramips_wdt_set_timeout(int val)
 {
        if (val < 1 || val > ramips_wdt_max_timeout) {
-               pr_crit(DRIVER_NAME
-                       ": timeout value %d must be 0 < timeout < %d\n",
-                       val, ramips_wdt_max_timeout);
+               pr_warn(DRIVER_NAME
+                       ": timeout value %d must be 0 < timeout <= %d, using %d\n",
+                       val, ramips_wdt_max_timeout, ramips_wdt_timeout);
                return -EINVAL;
        }
 
@@ -255,7 +255,7 @@ static struct miscdevice ramips_wdt_miscdev = {
        .fops = &ramips_wdt_fops,
 };
 
-static int __devinit ramips_wdt_probe(struct platform_device *pdev)
+static int ramips_wdt_probe(struct platform_device *pdev)
 {
        struct resource *res;
        int err;
@@ -291,7 +291,7 @@ static int __devinit ramips_wdt_probe(struct platform_device *pdev)
            ramips_wdt_timeout > ramips_wdt_max_timeout) {
                ramips_wdt_timeout = ramips_wdt_max_timeout;
                dev_info(&pdev->dev,
-                       "timeout value must be 0 < timeout < %d, using %d\n",
+                       "timeout value must be 0 < timeout <= %d, using %d\n",
                        ramips_wdt_max_timeout, ramips_wdt_timeout);
        }
 
@@ -313,7 +313,7 @@ err_unmap:
        return err;
 }
 
-static int __devexit ramips_wdt_remove(struct platform_device *pdev)
+static int ramips_wdt_remove(struct platform_device *pdev)
 {
        misc_deregister(&ramips_wdt_miscdev);
        clk_disable(ramips_wdt_clk);
@@ -328,7 +328,7 @@ static void ramips_wdt_shutdown(struct platform_device *pdev)
 }
 
 static struct platform_driver ramips_wdt_driver = {
-       .remove         = __devexit_p(ramips_wdt_remove),
+       .remove         = ramips_wdt_remove,
        .shutdown       = ramips_wdt_shutdown,
        .driver         = {
                .name   = DRIVER_NAME,