Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
[pandora-kernel.git] / drivers / char / watchdog / mpcore_wdt.c
index b4d8434..54b3c56 100644 (file)
@@ -21,7 +21,6 @@
  */
 #include <linux/module.h>
 #include <linux/moduleparam.h>
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/miscdevice.h>
 #include <linux/watchdog.h>
@@ -298,7 +297,7 @@ static void mpcore_wdt_shutdown(struct platform_device *dev)
 /*
  *     Kernel Interfaces
  */
-static struct file_operations mpcore_wdt_fops = {
+static const struct file_operations mpcore_wdt_fops = {
        .owner          = THIS_MODULE,
        .llseek         = no_llseek,
        .write          = mpcore_wdt_write,
@@ -338,6 +337,10 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev)
 
        wdt->dev = &dev->dev;
        wdt->irq = platform_get_irq(dev, 0);
+       if (wdt->irq < 0) {
+               ret = -ENXIO;
+               goto err_free;
+       }
        wdt->base = ioremap(res->start, res->end - res->start + 1);
        if (!wdt->base) {
                ret = -ENOMEM;
@@ -352,7 +355,7 @@ static int __devinit mpcore_wdt_probe(struct platform_device *dev)
                goto err_misc;
        }
 
-       ret = request_irq(wdt->irq, mpcore_wdt_fire, SA_INTERRUPT, "mpcore_wdt", wdt);
+       ret = request_irq(wdt->irq, mpcore_wdt_fire, IRQF_DISABLED, "mpcore_wdt", wdt);
        if (ret) {
                dev_printk(KERN_ERR, _dev, "cannot register IRQ%d for watchdog\n", wdt->irq);
                goto err_irq;