]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/watchdog/omap_wdt.c
Merge branch 'topic/hda' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound...
[mv-sheeva.git] / drivers / watchdog / omap_wdt.c
index 3ed571a2ab18712d3bc42c0c421d4a02a6d4bae1..c6aaf2845741379a69235ccc069cc8589600cbf0 100644 (file)
@@ -43,7 +43,7 @@
 #include <linux/io.h>
 #include <linux/uaccess.h>
 #include <mach/hardware.h>
-#include <mach/prcm.h>
+#include <plat/prcm.h>
 
 #include "omap_wdt.h"
 
@@ -277,8 +277,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
                goto err_busy;
        }
 
-       mem = request_mem_region(res->start, res->end - res->start + 1,
-                                pdev->name);
+       mem = request_mem_region(res->start, resource_size(res), pdev->name);
        if (!mem) {
                ret = -EBUSY;
                goto err_busy;
@@ -306,7 +305,7 @@ static int __devinit omap_wdt_probe(struct platform_device *pdev)
                goto err_clk;
        }
 
-       wdev->base = ioremap(res->start, res->end - res->start + 1);
+       wdev->base = ioremap(res->start, resource_size(res));
        if (!wdev->base) {
                ret = -ENOMEM;
                goto err_ioremap;
@@ -358,7 +357,7 @@ err_clk:
        kfree(wdev);
 
 err_kzalloc:
-       release_mem_region(res->start, res->end - res->start + 1);
+       release_mem_region(res->start, resource_size(res));
 
 err_busy:
 err_get_resource:
@@ -383,7 +382,7 @@ static int __devexit omap_wdt_remove(struct platform_device *pdev)
                return -ENOENT;
 
        misc_deregister(&(wdev->omap_wdt_miscdev));
-       release_mem_region(res->start, res->end - res->start + 1);
+       release_mem_region(res->start, resource_size(res));
        platform_set_drvdata(pdev, NULL);
 
        clk_put(wdev->ick);