summaryrefslogtreecommitdiff
path: root/drivers/staging/mt7621-pci
diff options
context:
space:
mode:
authorSergio Paracuellos <sergio.paracuellos@gmail.com>2018-11-04 11:49:55 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-11-11 11:36:16 -0800
commitbcb4530736a6f7215ab9306f669a8688adf7448c (patch)
tree9a4213cde94d6f26628d9591da4e594904576da4 /drivers/staging/mt7621-pci
parentbd1a05bd87ad8b66c9bad4614514a1551015074e (diff)
staging: mt7621-pci: use PCIE_PORT_LINKUP instead of hardcode value
PCIE_PORT_LINKUP is defined and can be used to check if link is up for each controller. Use it instead of use a hardcode value. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/mt7621-pci')
-rw-r--r--drivers/staging/mt7621-pci/pci-mt7621.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c
index 7fa37b67808a..8b7c63d7e353 100644
--- a/drivers/staging/mt7621-pci/pci-mt7621.c
+++ b/drivers/staging/mt7621-pci/pci-mt7621.c
@@ -594,7 +594,7 @@ static int mt7621_pcie_init_port(struct mt7621_pcie_port *port)
reset_control_assert(port->pcie_rst);
reset_control_deassert(port->pcie_rst);
- if ((pcie_port_read(port, RALINK_PCI_STATUS) & 0x1) == 0) {
+ if ((pcie_port_read(port, RALINK_PCI_STATUS) & PCIE_PORT_LINKUP) == 0) {
dev_err(dev, "pcie%d no card, disable it (RST & CLK)\n", slot);
reset_control_assert(port->pcie_rst);
rt_sysc_m32(PCIE_PORT_CLK_EN(slot), 0, RALINK_CLKCFG1);