diff options
Diffstat (limited to 'kernel/irq/chip.c')
-rw-r--r-- | kernel/irq/chip.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index a4bb0da9c88c..9fc5e69213de 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c | |||
@@ -27,7 +27,8 @@ void dynamic_irq_init(unsigned int irq) | |||
27 | struct irq_desc *desc; | 27 | struct irq_desc *desc; |
28 | unsigned long flags; | 28 | unsigned long flags; |
29 | 29 | ||
30 | desc = irq_to_desc(irq); | 30 | /* first time to use this irq_desc */ |
31 | desc = irq_to_desc_alloc(irq); | ||
31 | if (!desc) { | 32 | if (!desc) { |
32 | WARN(1, KERN_ERR "Trying to initialize invalid IRQ%d\n", irq); | 33 | WARN(1, KERN_ERR "Trying to initialize invalid IRQ%d\n", irq); |
33 | return; | 34 | return; |
@@ -60,7 +61,7 @@ void dynamic_irq_cleanup(unsigned int irq) | |||
60 | struct irq_desc *desc; | 61 | struct irq_desc *desc; |
61 | unsigned long flags; | 62 | unsigned long flags; |
62 | 63 | ||
63 | desc = __irq_to_desc(irq); | 64 | desc = irq_to_desc(irq); |
64 | if (!desc) { | 65 | if (!desc) { |
65 | WARN(1, KERN_ERR "Trying to cleanup invalid IRQ%d\n", irq); | 66 | WARN(1, KERN_ERR "Trying to cleanup invalid IRQ%d\n", irq); |
66 | return; | 67 | return; |
@@ -92,7 +93,7 @@ int set_irq_chip(unsigned int irq, struct irq_chip *chip) | |||
92 | struct irq_desc *desc; | 93 | struct irq_desc *desc; |
93 | unsigned long flags; | 94 | unsigned long flags; |
94 | 95 | ||
95 | desc = __irq_to_desc(irq); | 96 | desc = irq_to_desc(irq); |
96 | if (!desc) { | 97 | if (!desc) { |
97 | WARN(1, KERN_ERR "Trying to install chip for IRQ%d\n", irq); | 98 | WARN(1, KERN_ERR "Trying to install chip for IRQ%d\n", irq); |
98 | return -EINVAL; | 99 | return -EINVAL; |
@@ -122,7 +123,7 @@ int set_irq_type(unsigned int irq, unsigned int type) | |||
122 | unsigned long flags; | 123 | unsigned long flags; |
123 | int ret = -ENXIO; | 124 | int ret = -ENXIO; |
124 | 125 | ||
125 | desc = __irq_to_desc(irq); | 126 | desc = irq_to_desc(irq); |
126 | if (!desc) { | 127 | if (!desc) { |
127 | printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq); | 128 | printk(KERN_ERR "Trying to set irq type for IRQ%d\n", irq); |
128 | return -ENODEV; | 129 | return -ENODEV; |
@@ -150,7 +151,7 @@ int set_irq_data(unsigned int irq, void *data) | |||
150 | struct irq_desc *desc; | 151 | struct irq_desc *desc; |
151 | unsigned long flags; | 152 | unsigned long flags; |
152 | 153 | ||
153 | desc = __irq_to_desc(irq); | 154 | desc = irq_to_desc(irq); |
154 | if (!desc) { | 155 | if (!desc) { |
155 | printk(KERN_ERR | 156 | printk(KERN_ERR |
156 | "Trying to install controller data for IRQ%d\n", irq); | 157 | "Trying to install controller data for IRQ%d\n", irq); |
@@ -176,7 +177,7 @@ int set_irq_msi(unsigned int irq, struct msi_desc *entry) | |||
176 | struct irq_desc *desc; | 177 | struct irq_desc *desc; |
177 | unsigned long flags; | 178 | unsigned long flags; |
178 | 179 | ||
179 | desc = __irq_to_desc(irq); | 180 | desc = irq_to_desc(irq); |
180 | if (!desc) { | 181 | if (!desc) { |
181 | printk(KERN_ERR | 182 | printk(KERN_ERR |
182 | "Trying to install msi data for IRQ%d\n", irq); | 183 | "Trying to install msi data for IRQ%d\n", irq); |
@@ -203,7 +204,7 @@ int set_irq_chip_data(unsigned int irq, void *data) | |||
203 | struct irq_desc *desc; | 204 | struct irq_desc *desc; |
204 | unsigned long flags; | 205 | unsigned long flags; |
205 | 206 | ||
206 | desc = __irq_to_desc(irq); | 207 | desc = irq_to_desc(irq); |
207 | if (!desc) { | 208 | if (!desc) { |
208 | printk(KERN_ERR | 209 | printk(KERN_ERR |
209 | "Trying to install chip data for IRQ%d\n", irq); | 210 | "Trying to install chip data for IRQ%d\n", irq); |
@@ -554,7 +555,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained, | |||
554 | struct irq_desc *desc; | 555 | struct irq_desc *desc; |
555 | unsigned long flags; | 556 | unsigned long flags; |
556 | 557 | ||
557 | desc = __irq_to_desc(irq); | 558 | desc = irq_to_desc(irq); |
558 | if (!desc) { | 559 | if (!desc) { |
559 | printk(KERN_ERR | 560 | printk(KERN_ERR |
560 | "Trying to install type control for IRQ%d\n", irq); | 561 | "Trying to install type control for IRQ%d\n", irq); |
@@ -618,7 +619,7 @@ void __init set_irq_noprobe(unsigned int irq) | |||
618 | struct irq_desc *desc; | 619 | struct irq_desc *desc; |
619 | unsigned long flags; | 620 | unsigned long flags; |
620 | 621 | ||
621 | desc = __irq_to_desc(irq); | 622 | desc = irq_to_desc(irq); |
622 | if (!desc) { | 623 | if (!desc) { |
623 | printk(KERN_ERR "Trying to mark IRQ%d non-probeable\n", irq); | 624 | printk(KERN_ERR "Trying to mark IRQ%d non-probeable\n", irq); |
624 | 625 | ||
@@ -635,7 +636,7 @@ void __init set_irq_probe(unsigned int irq) | |||
635 | struct irq_desc *desc; | 636 | struct irq_desc *desc; |
636 | unsigned long flags; | 637 | unsigned long flags; |
637 | 638 | ||
638 | desc = __irq_to_desc(irq); | 639 | desc = irq_to_desc(irq); |
639 | if (!desc) { | 640 | if (!desc) { |
640 | printk(KERN_ERR "Trying to mark IRQ%d probeable\n", irq); | 641 | printk(KERN_ERR "Trying to mark IRQ%d probeable\n", irq); |
641 | 642 | ||