]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - arch/arm/mach-ixp4xx/nslu2-power.c
[ARM] 3772/1: Fix compilation error in mach-ixp4xx/nslu2*
[mirror_ubuntu-bionic-kernel.git] / arch / arm / mach-ixp4xx / nslu2-power.c
index b0ad9e901f6eb924b82164340b679332b47ff616..a29b3b2b61b63cfb085ff54d2af53c1251fe316a 100644 (file)
 
 #include <linux/module.h>
 #include <linux/reboot.h>
+#include <linux/irq.h>
 #include <linux/interrupt.h>
+#include <linux/reboot.h>
 
 #include <asm/mach-types.h>
 
-extern void ctrl_alt_del(void);
-
 static irqreturn_t nslu2_power_handler(int irq, void *dev_id, struct pt_regs *regs)
 {
        /* Signal init to do the ctrlaltdel action, this will bypass init if
@@ -55,7 +55,7 @@ static int __init nslu2_power_init(void)
        set_irq_type(NSLU2_PB_IRQ, IRQT_HIGH);
 
        if (request_irq(NSLU2_RB_IRQ, &nslu2_reset_handler,
-               SA_INTERRUPT, "NSLU2 reset button", NULL) < 0) {
+               IRQF_DISABLED, "NSLU2 reset button", NULL) < 0) {
 
                printk(KERN_DEBUG "Reset Button IRQ %d not available\n",
                        NSLU2_RB_IRQ);
@@ -64,7 +64,7 @@ static int __init nslu2_power_init(void)
        }
 
        if (request_irq(NSLU2_PB_IRQ, &nslu2_power_handler,
-               SA_INTERRUPT, "NSLU2 power button", NULL) < 0) {
+               IRQF_DISABLED, "NSLU2 power button", NULL) < 0) {
 
                printk(KERN_DEBUG "Power Button IRQ %d not available\n",
                        NSLU2_PB_IRQ);
@@ -77,6 +77,9 @@ static int __init nslu2_power_init(void)
 
 static void __exit nslu2_power_exit(void)
 {
+       if (!(machine_is_nslu2()))
+               return;
+
        free_irq(NSLU2_RB_IRQ, NULL);
        free_irq(NSLU2_PB_IRQ, NULL);
 }