.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright (c) 2011 Zhang, Keguang <keguang.zhang@gmail.com> |
---|
3 | | - * |
---|
4 | | - * This program is free software; you can redistribute it and/or modify it |
---|
5 | | - * under the terms of the GNU General Public License as published by the |
---|
6 | | - * Free Software Foundation; either version 2 of the License, or (at your |
---|
7 | | - * option) any later version. |
---|
8 | 4 | */ |
---|
9 | 5 | |
---|
10 | 6 | #include <linux/interrupt.h> |
---|
.. | .. |
---|
153 | 149 | |
---|
154 | 150 | } |
---|
155 | 151 | |
---|
156 | | -static struct irqaction cascade_irqaction = { |
---|
157 | | - .handler = no_action, |
---|
158 | | - .name = "cascade", |
---|
159 | | - .flags = IRQF_NO_THREAD, |
---|
160 | | -}; |
---|
161 | | - |
---|
162 | 152 | static void __init ls1x_irq_init(int base) |
---|
163 | 153 | { |
---|
164 | 154 | int n; |
---|
.. | .. |
---|
180 | 170 | handle_level_irq); |
---|
181 | 171 | } |
---|
182 | 172 | |
---|
183 | | - setup_irq(INT0_IRQ, &cascade_irqaction); |
---|
184 | | - setup_irq(INT1_IRQ, &cascade_irqaction); |
---|
185 | | - setup_irq(INT2_IRQ, &cascade_irqaction); |
---|
186 | | - setup_irq(INT3_IRQ, &cascade_irqaction); |
---|
| 173 | + if (request_irq(INT0_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) |
---|
| 174 | + pr_err("Failed to request irq %d (cascade)\n", INT0_IRQ); |
---|
| 175 | + if (request_irq(INT1_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) |
---|
| 176 | + pr_err("Failed to request irq %d (cascade)\n", INT1_IRQ); |
---|
| 177 | + if (request_irq(INT2_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) |
---|
| 178 | + pr_err("Failed to request irq %d (cascade)\n", INT2_IRQ); |
---|
| 179 | + if (request_irq(INT3_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) |
---|
| 180 | + pr_err("Failed to request irq %d (cascade)\n", INT3_IRQ); |
---|
187 | 181 | #if defined(CONFIG_LOONGSON1_LS1C) |
---|
188 | | - setup_irq(INT4_IRQ, &cascade_irqaction); |
---|
| 182 | + if (request_irq(INT4_IRQ, no_action, IRQF_NO_THREAD, "cascade", NULL)) |
---|
| 183 | + pr_err("Failed to request irq %d (cascade)\n", INT4_IRQ); |
---|
189 | 184 | #endif |
---|
190 | 185 | } |
---|
191 | 186 | |
---|