aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic/io_apic.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/kernel/apic/io_apic.c')
-rw-r--r--arch/x86/kernel/apic/io_apic.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index d9e8f19088d4..9386976b675b 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -515,10 +515,10 @@ static void __init replace_pin_at_irq_node(struct irq_cfg *cfg, int node,
515 int oldapic, int oldpin, 515 int oldapic, int oldpin,
516 int newapic, int newpin) 516 int newapic, int newpin)
517{ 517{
518 struct irq_pin_list *entry = cfg->irq_2_pin; 518 struct irq_pin_list *entry;
519 int replaced = 0; 519 int replaced = 0;
520 520
521 while (entry) { 521 for (entry = cfg->irq_2_pin; entry != NULL; entry = entry->next) {
522 if (entry->apic == oldapic && entry->pin == oldpin) { 522 if (entry->apic == oldapic && entry->pin == oldpin) {
523 entry->apic = newapic; 523 entry->apic = newapic;
524 entry->pin = newpin; 524 entry->pin = newpin;
@@ -526,7 +526,6 @@ static void __init replace_pin_at_irq_node(struct irq_cfg *cfg, int node,
526 /* every one is different, right? */ 526 /* every one is different, right? */
527 break; 527 break;
528 } 528 }
529 entry = entry->next;
530 } 529 }
531 530
532 /* why? call replace before add? */ 531 /* why? call replace before add? */