forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-09-20 a36159eec6ca17402b0e146b86efaf76568dc353
kernel/arch/mips/ar7/irq.c
....@@ -1,20 +1,7 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Copyright (C) 2006,2007 Felix Fietkau <nbd@openwrt.org>
34 * Copyright (C) 2006,2007 Eugene Konev <ejka@openwrt.org>
4
- *
5
- * This program is free software; you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation; either version 2 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program; if not, write to the Free Software
17
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
185 */
196
207 #include <linux/interrupt.h>
....@@ -96,12 +83,6 @@
9683 .irq_ack = ar7_ack_sec_irq,
9784 };
9885
99
-static struct irqaction ar7_cascade_action = {
100
- .handler = no_action,
101
- .name = "AR7 cascade interrupt",
102
- .flags = IRQF_NO_THREAD,
103
-};
104
-
10586 static void __init ar7_irq_init(int base)
10687 {
10788 int i;
....@@ -129,8 +110,14 @@
129110 handle_level_irq);
130111 }
131112
132
- setup_irq(2, &ar7_cascade_action);
133
- setup_irq(ar7_irq_base, &ar7_cascade_action);
113
+ if (request_irq(2, no_action, IRQF_NO_THREAD, "AR7 cascade interrupt",
114
+ NULL))
115
+ pr_err("Failed to request irq 2 (AR7 cascade interrupt)\n");
116
+ if (request_irq(ar7_irq_base, no_action, IRQF_NO_THREAD,
117
+ "AR7 cascade interrupt", NULL)) {
118
+ pr_err("Failed to request irq %d (AR7 cascade interrupt)\n",
119
+ ar7_irq_base);
120
+ }
134121 set_c0_status(IE_IRQ0);
135122 }
136123