Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[powerpc.git] / drivers / char / watchdog / rm9k_wdt.c
index ec39093..5c921e4 100644 (file)
@@ -47,7 +47,7 @@
 
 
 /* Function prototypes */
-static irqreturn_t wdt_gpi_irqhdl(int, void *, struct pt_regs *);
+static irqreturn_t wdt_gpi_irqhdl(int, void *);
 static void wdt_gpi_start(void);
 static void wdt_gpi_stop(void);
 static void wdt_gpi_set_timeout(unsigned int);
@@ -94,8 +94,28 @@ module_param(nowayout, bool, 0444);
 MODULE_PARM_DESC(nowayout, "Watchdog cannot be disabled once started");
 
 
+/* Kernel interfaces */
+static const struct file_operations fops = {
+       .owner          = THIS_MODULE,
+       .open           = wdt_gpi_open,
+       .release        = wdt_gpi_release,
+       .write          = wdt_gpi_write,
+       .unlocked_ioctl = wdt_gpi_ioctl,
+};
+
+static struct miscdevice miscdev = {
+       .minor          = WATCHDOG_MINOR,
+       .name           = wdt_gpi_name,
+       .fops           = &fops,
+};
+
+static struct notifier_block wdt_gpi_shutdown = {
+       .notifier_call  = wdt_gpi_notify,
+};
+
+
 /* Interrupt handler */
-static irqreturn_t wdt_gpi_irqhdl(int irq, void *ctxt, struct pt_regs *regs)
+static irqreturn_t wdt_gpi_irqhdl(int irq, void *ctxt)
 {
        if (!unlikely(__raw_readl(wd_regs + 0x0008) & 0x1))
                return IRQ_NONE;
@@ -172,7 +192,7 @@ static int wdt_gpi_open(struct inode *inode, struct file *file)
                locked = 0;
        }
 
-       res = request_irq(wd_irq, wdt_gpi_irqhdl, SA_SHIRQ | SA_INTERRUPT,
+       res = request_irq(wd_irq, wdt_gpi_irqhdl, IRQF_SHARED | IRQF_DISABLED,
                          wdt_gpi_name, &miscdev);
        if (unlikely(res))
                return res;
@@ -312,26 +332,6 @@ wdt_gpi_notify(struct notifier_block *this, unsigned long code, void *unused)
 }
 
 
-/* Kernel interfaces */
-static struct file_operations fops = {
-       .owner          = THIS_MODULE,
-       .open           = wdt_gpi_open,
-       .release        = wdt_gpi_release,
-       .write          = wdt_gpi_write,
-       .unlocked_ioctl = wdt_gpi_ioctl,
-};
-
-static struct miscdevice miscdev = {
-       .minor          = WATCHDOG_MINOR,
-       .name           = wdt_gpi_name,
-       .fops           = &fops,
-};
-
-static struct notifier_block wdt_gpi_shutdown = {
-       .notifier_call  = wdt_gpi_notify,
-};
-
-
 /* Init & exit procedures */
 static const struct resource *
 wdt_gpi_get_resource(struct platform_device *pdv, const char *name,