summaryrefslogtreecommitdiffstats
path: root/arch/x86/pci/intel_mid_pci.c
diff options
context:
space:
mode:
authorJiang Liu <jiang.liu@linux.intel.com>2015-06-10 10:55:00 +0200
committerBjorn Helgaas <bhelgaas@google.com>2015-07-30 21:13:20 +0200
commit811a4e6fce09bc9239c664c6a1a53645a678c303 (patch)
tree069115c57617ebe535f923e8c6b1b4c1fbe28492 /arch/x86/pci/intel_mid_pci.c
parentPCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq() (diff)
downloadlinux-811a4e6fce09bc9239c664c6a1a53645a678c303.tar.xz
linux-811a4e6fce09bc9239c664c6a1a53645a678c303.zip
PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed
Add pci_has_managed_irq(), pci_set_managed_irq(), and pci_reset_managed_irq() to simplify code. No functional change. [bhelgaas: changelog] Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/x86/pci/intel_mid_pci.c')
-rw-r--r--arch/x86/pci/intel_mid_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/pci/intel_mid_pci.c b/arch/x86/pci/intel_mid_pci.c
index fb7a1f96d80c..22aaefb4f1ca 100644
--- a/arch/x86/pci/intel_mid_pci.c
+++ b/arch/x86/pci/intel_mid_pci.c
@@ -211,7 +211,7 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
struct irq_alloc_info info;
int polarity;
- if (dev->irq_managed && dev->irq > 0)
+ if (pci_has_managed_irq(dev))
return 0;
if (intel_mid_identify_cpu() == INTEL_MID_CPU_CHIP_TANGIER)
@@ -234,7 +234,7 @@ static int intel_mid_pci_irq_enable(struct pci_dev *dev)
static void intel_mid_pci_irq_disable(struct pci_dev *dev)
{
- if (dev->irq_managed && dev->irq > 0) {
+ if (pci_has_managed_irq(dev)) {
mp_unmap_irq(dev->irq);
dev->irq_managed = 0;
/*