Skip to content

Commit

Permalink
x86/pci/intel_mid_pci: Use proper constants for irq polarity
Browse files Browse the repository at this point in the history
polarity = 0 means active high. Not really intuitive, so people add
comments to it instead of just using a self explaining constant.

Use the IOAPIC_POL_ constants and get rid of those horrible to read
tail comments.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>
  • Loading branch information
Thomas Gleixner committed Jul 29, 2015
1 parent 0abbdea commit 5054e1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/x86/pci/intel_mid_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)

switch (intel_mid_identify_cpu()) {
case INTEL_MID_CPU_CHIP_TANGIER:
polarity = 0; /* active high */
polarity = IOAPIC_POL_HIGH;

/* Special treatment for IRQ0 */
if (dev->irq == 0) {
Expand All @@ -235,7 +235,7 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
}
break;
default:
polarity = 1; /* active low */
polarity = IOAPIC_POL_LOW;
break;
}

Expand Down

0 comments on commit 5054e1e

Please sign in to comment.