qlge: bugfix: Move netif_napi_del() to common call point.
[safe/jmp/linux-2.6] / drivers / watchdog / s3c2410_wdt.c
index 44bf5e4..e31925e 100644 (file)
@@ -6,7 +6,7 @@
  * S3C2410 Watchdog Timer Support
  *
  * Based on, softdog.c by Alan Cox,
- *     (c) Copyright 1996 Alan Cox <alan@redhat.com>
+ *     (c) Copyright 1996 Alan Cox <alan@lxorguk.ukuu.org.uk>
  *
  * 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
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * Changelog:
- *     05-Oct-2004     BJD     Added semaphore init to stop crashes on open
- *                             Fixed tmr_count / wdt_count confusion
- *                             Added configurable debug
- *
- *     11-Jan-2005     BJD     Fixed divide-by-2 in timeout code
- *
- *     25-Jan-2005     DA      Added suspend/resume support
- *                             Replaced reboot notifier with .shutdown method
- *
- *     10-Mar-2005     LCVR    Changed S3C2410_VA to S3C24XX_VA
 */
 
 #include <linux/module.h>
 #include <linux/uaccess.h>
 #include <linux/io.h>
 
-#include <asm/arch/map.h>
+#include <mach/map.h>
 
 #undef S3C_VA_WATCHDOG
 #define S3C_VA_WATCHDOG (0)
 
-#include <asm/plat-s3c/regs-watchdog.h>
+#include <plat/regs-watchdog.h>
 
 #define PFX "s3c2410-wdt: "
 
@@ -119,17 +107,6 @@ static void __s3c2410wdt_stop(void)
 {
        unsigned long wtcon;
 
-       spin_lock(&wdt_lock);
-       wtcon = readl(wdt_base + S3C2410_WTCON);
-       wtcon &= ~(S3C2410_WTCON_ENABLE | S3C2410_WTCON_RSTEN);
-       writel(wtcon, wdt_base + S3C2410_WTCON);
-       spin_unlock(&wdt_lock);
-}
-
-static void __s3c2410wdt_stop(void)
-{
-       unsigned long wtcon;
-
        wtcon = readl(wdt_base + S3C2410_WTCON);
        wtcon &= ~(S3C2410_WTCON_ENABLE | S3C2410_WTCON_RSTEN);
        writel(wtcon, wdt_base + S3C2410_WTCON);
@@ -168,8 +145,6 @@ static void s3c2410wdt_start(void)
        writel(wdt_count, wdt_base + S3C2410_WTCNT);
        writel(wtcon, wdt_base + S3C2410_WTCON);
        spin_unlock(&wdt_lock);
-
-       return 0;
 }
 
 static int s3c2410wdt_set_heartbeat(int timeout)
@@ -378,7 +353,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
                return -ENOENT;
        }
 
-       size = (res->end-res->start)+1;
+       size = (res->end - res->start) + 1;
        wdt_mem = request_mem_region(res->start, size, pdev->name);
        if (wdt_mem == NULL) {
                dev_err(dev, "failed to get memory region\n");
@@ -387,7 +362,7 @@ static int s3c2410wdt_probe(struct platform_device *pdev)
        }
 
        wdt_base = ioremap(res->start, size);
-       if (wdt_base == 0) {
+       if (wdt_base == NULL) {
                dev_err(dev, "failed to ioremap() region\n");
                ret = -EINVAL;
                goto err_req;