浏览代码

PCI: pciehp: Use symbolic constants, not hard-coded bitmask

Use the PCI_EXP_SLTSTA definitions, not 0x1f, when clearing Slot Status
bits.

No functional change.

Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Bjorn Helgaas 12 年之前
父节点
当前提交
df72648c4d
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      drivers/pci/hotplug/pciehp_hpc.c

+ 4 - 1
drivers/pci/hotplug/pciehp_hpc.c

@@ -808,7 +808,10 @@ struct controller *pcie_init(struct pcie_device *dev)
         }
 
 	/* Clear all remaining event bits in Slot Status register */
-	pcie_capability_write_word(pdev, PCI_EXP_SLTSTA, 0x1f);
+	pcie_capability_write_word(pdev, PCI_EXP_SLTSTA,
+		PCI_EXP_SLTSTA_ABP | PCI_EXP_SLTSTA_PFD |
+		PCI_EXP_SLTSTA_MRLSC | PCI_EXP_SLTSTA_PDC |
+		PCI_EXP_SLTSTA_CC);
 
 	/* Disable software notification */
 	pcie_disable_notification(ctrl);