summaryrefslogtreecommitdiff
path: root/arch/m68k/mac
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2022-07-06 16:48:46 +0300
committerGeert Uytterhoeven <geert@linux-m68k.org>2022-07-12 11:48:21 +0300
commitc36dd297b6c09fff56b629a231cf2aa0af333c2d (patch)
tree6aad4cb10d04f17c5dfd2a42218f62fdeb47a525 /arch/m68k/mac
parent566a2d6d8e429727832c7e347cbe736b12ad7297 (diff)
downloadlinux-c36dd297b6c09fff56b629a231cf2aa0af333c2d.tar.xz
m68k: mac: Remove forward declaration for mac_nmi_handler()
Move mac_nmi_handler() before its caller, so its forward declaration can be dropped. While at it, make the function static, and absorb the variable in_nmi, which is only used inside the function. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Finn Thain <fthain@linux-m68k.org> Link: https://lore.kernel.org/r/fa48394ecba7c29a2da354d13c1017b37237f25b.1657114783.git.geert@linux-m68k.org
Diffstat (limited to 'arch/m68k/mac')
-rw-r--r--arch/m68k/mac/macints.c32
1 files changed, 15 insertions, 17 deletions
diff --git a/arch/m68k/mac/macints.c b/arch/m68k/mac/macints.c
index e3575388cd05..883e48230f87 100644
--- a/arch/m68k/mac/macints.c
+++ b/arch/m68k/mac/macints.c
@@ -129,8 +129,6 @@
extern void show_registers(struct pt_regs *);
-irqreturn_t mac_nmi_handler(int, void *);
-
static unsigned int mac_irq_startup(struct irq_data *);
static void mac_irq_shutdown(struct irq_data *);
@@ -142,6 +140,21 @@ static struct irq_chip mac_irq_chip = {
.irq_shutdown = mac_irq_shutdown,
};
+static irqreturn_t mac_nmi_handler(int irq, void *dev_id)
+{
+ static volatile int in_nmi;
+
+ if (in_nmi)
+ return IRQ_HANDLED;
+ in_nmi = 1;
+
+ pr_info("Non-Maskable Interrupt\n");
+ show_registers(get_irq_regs());
+
+ in_nmi = 0;
+ return IRQ_HANDLED;
+}
+
void __init mac_init_IRQ(void)
{
m68k_setup_irq_controller(&mac_irq_chip, handle_simple_irq, IRQ_USER,
@@ -254,18 +267,3 @@ static void mac_irq_shutdown(struct irq_data *data)
else
mac_irq_disable(data);
}
-
-static volatile int in_nmi;
-
-irqreturn_t mac_nmi_handler(int irq, void *dev_id)
-{
- if (in_nmi)
- return IRQ_HANDLED;
- in_nmi = 1;
-
- pr_info("Non-Maskable Interrupt\n");
- show_registers(get_irq_regs());
-
- in_nmi = 0;
- return IRQ_HANDLED;
-}