diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-09 16:46:12 -0600 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-15 14:30:44 -0600 |
commit | 545d7b78e0bbe686056cdd6cd431ca1946641b31 (patch) | |
tree | 86495cc7c7ec4dd824e0e4d72c4c11a886725d37 /drivers | |
parent | 05795726e82372d3fe46210fcb3320f1fa49aea7 (diff) |
PCI: Use PCI_EXP_SLTCAP_PSN mask when extracting slot number
Use PCI_EXP_SLTCAP_PSN mask to make it easier to find where the
Physical Slot Number is used.
The Physical Slot Number is bits 31:19 of the Slot Capabilities Register,
and slot_cap is a u32, so the mask is technically unnecessary, but it's
helpful for human readers.
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/pci/hotplug/pciehp_acpi.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/pciehp_acpi.c b/drivers/pci/hotplug/pciehp_acpi.c index 24d709b7388..ead7c534095 100644 --- a/drivers/pci/hotplug/pciehp_acpi.c +++ b/drivers/pci/hotplug/pciehp_acpi.c @@ -90,7 +90,7 @@ static int __init dummy_probe(struct pcie_device *dev) slot = kzalloc(sizeof(*slot), GFP_KERNEL); if (!slot) return -ENOMEM; - slot->number = slot_cap >> 19; + slot->number = (slot_cap & PCI_EXP_SLTCAP_PSN) >> 19; list_for_each_entry(tmp, &dummy_slots, list) { if (tmp->number == slot->number) dup_slot_id++; |