summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2014-01-17 16:01:27 -0600
committerRob Herring <robh@kernel.org>2014-01-17 16:01:27 -0600
commit361128fcbf30f590a05c8e8789155364f37367db (patch)
tree7f7973599e286dfd48ea724a5b7fb4bca76b294e /drivers/pci/pci.c
parente2897d7e0b0460dca91b52d55ce41c888363502d (diff)
parent482c43419fc204b4b658fa4acb80cd502e5fcbac (diff)
downloadlinux-361128fcbf30f590a05c8e8789155364f37367db.tar.bz2
Merge remote-tracking branch 'grant/devicetree/next' into for-3.14
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index 33120d156668..07369f32e8bb 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -4165,6 +4165,14 @@ int pci_set_vga_state(struct pci_dev *dev, bool decode,
return 0;
}
+bool pci_device_is_present(struct pci_dev *pdev)
+{
+ u32 v;
+
+ return pci_bus_read_dev_vendor_id(pdev->bus, pdev->devfn, &v, 0);
+}
+EXPORT_SYMBOL_GPL(pci_device_is_present);
+
#define RESOURCE_ALIGNMENT_PARAM_SIZE COMMAND_LINE_SIZE
static char resource_alignment_param[RESOURCE_ALIGNMENT_PARAM_SIZE] = {0};
static DEFINE_SPINLOCK(resource_alignment_lock);