From e80cae4b4b80792f1bb4e1cbb36f122ccf1232e9 Mon Sep 17 00:00:00 2001 From: Kenji Kaneshige Date: Fri, 20 Mar 2009 14:55:55 -0600 Subject: [PATCH] --- yaml --- r: 139375 b: refs/heads/master c: 79af72d716cf1bb13b175429cf181a6c4d063ee8 h: refs/heads/master i: 139373: b85d152eac16ebf562d14ab65eb9afe3f43735e0 139371: 55147a0ff179f7e6dcf639c40fb365796ea71270 139367: 47ec2496be3cfcba4db502a6dad149e683c7b594 139359: 7cf3a97b32b2565381d2c45186d4355063412fa1 v: v3 --- [refs] | 2 +- trunk/include/linux/pci.h | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index d7470b7fda5b..d00cfcf6fda7 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 068258bc15439c11a966e873f931cc8e513dca61 +refs/heads/master: 79af72d716cf1bb13b175429cf181a6c4d063ee8 diff --git a/trunk/include/linux/pci.h b/trunk/include/linux/pci.h index 1216843412da..50d94388e87c 100644 --- a/trunk/include/linux/pci.h +++ b/trunk/include/linux/pci.h @@ -357,6 +357,15 @@ struct pci_bus { #define pci_bus_b(n) list_entry(n, struct pci_bus, node) #define to_pci_bus(n) container_of(n, struct pci_bus, dev) +/* + * Returns true if the pci bus is root (behind host-pci bridge), + * false otherwise + */ +static inline bool pci_is_root_bus(struct pci_bus *pbus) +{ + return !(pbus->parent); +} + #ifdef CONFIG_PCI_MSI static inline bool pci_dev_msi_enabled(struct pci_dev *pci_dev) {