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 16:55:00 +0800
committerBjorn Helgaas <bhelgaas@google.com>2015-07-30 14:13:20 -0500
commit811a4e6fce09bc9239c664c6a1a53645a678c303 (patch)
tree069115c57617ebe535f923e8c6b1b4c1fbe28492 /arch/x86/pci/intel_mid_pci.c
parent991de2e59090e55c65a7f59a049142e3c480f7bd (diff)
downloadop-kernel-dev-811a4e6fce09bc9239c664c6a1a53645a678c303.zip
op-kernel-dev-811a4e6fce09bc9239c664c6a1a53645a678c303.tar.gz
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 fb7a1f9..22aaefb 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;
/*
OpenPOWER on IntegriCloud