From 7c106cbb2ba8c86bedd2868b690aee8965476b3b Mon Sep 17 00:00:00 2001 From: Sergio Paracuellos Date: Mon, 7 Jan 2019 20:31:43 +0100 Subject: [PATCH] staging: mt7621-pci: use PCI definitions instead of hardcode values Seting up ports to enable PCI_COMMAND_MASTER is using '0x4' as a hardcore value and '0x4' also for PCI_COMMAND register instead of use definitions from linux pci system headers. Replace both. Signed-off-by: Sergio Paracuellos Signed-off-by: Greg Kroah-Hartman --- drivers/staging/mt7621-pci/pci-mt7621.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index 8db94fdbdd6d..507b8c68d20b 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -515,8 +515,9 @@ static void mt7621_pcie_enable_ports(struct mt7621_pcie *pcie) } for (slot = 0; slot < num_slots_enabled; slot++) { - val = read_config(pcie, slot, 0x4); - write_config(pcie, slot, 0x4, val | 0x4); + val = read_config(pcie, slot, PCI_COMMAND); + val |= PCI_COMMAND_MASTER; + write_config(pcie, slot, PCI_COMMAND, val); /* configure RC FTS number to 250 when it leaves L0s */ val = read_config(pcie, slot, PCIE_FTS_NUM); val &= ~PCIE_FTS_NUM_MASK;