[PATCH libpciaccess] PCI: set correct mask value when matching for bridges.

Egbert Eich eich at freedesktop.org
Wed Sep 7 07:44:48 PDT 2011


The mask must not be zero otherwise the matching condition will never
be true: ((val & mask) == set).

Signed-off-by: Egbert Eich <eich at freedesktop.org>
---
 src/common_bridge.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/common_bridge.c b/src/common_bridge.c
index 871c1f6..aea9435 100644
--- a/src/common_bridge.c
+++ b/src/common_bridge.c
@@ -328,7 +328,7 @@ pci_device_get_parent_bridge(struct pci_device *dev)
     struct pci_id_match bridge_match = {
         PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY,
         (PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_PCI << 8),
-        0
+        (PCI_CLASS_BRIDGE << 16) | (PCI_SUBCLASS_BRIDGE_PCI << 8)
     };
 
     struct pci_device *bridge;
-- 
1.7.3.4



More information about the xorg-devel mailing list