diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2018-08-10 18:58:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-08-27 19:31:59 +0200 |
commit | 293dcd6592a29eec392312246f2b158195d700d6 (patch) | |
tree | ec9b8d636e5795fbec6e8ead9500bd6fc55e40fd /drivers/staging/mt7621-pci/pci-mt7621.c | |
parent | 02d72eef1814ea05e2613e5ab6136d8393f8a682 (diff) |
staging: mt7621-pci: show N_FTS status using a loop
There are some printk's which can be replaced properly
using dev_* kernel functions. Use dev_info to show
N_FTS status for each port using a loop instead of duplicating
lines of code.
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/pci-mt7621.c')
-rw-r--r-- | drivers/staging/mt7621-pci/pci-mt7621.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index e904adc3b8c9..df2d522abac4 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -500,14 +500,11 @@ static int mt7621_pci_probe(struct platform_device *pdev) bypass_pipe_rst(pcie); set_phy_for_ssc(pcie); - val = read_config(pcie, 0, 0x70c); - printk("Port 0 N_FTS = %x\n", (unsigned int)val); - - val = read_config(pcie, 1, 0x70c); - printk("Port 1 N_FTS = %x\n", (unsigned int)val); - - val = read_config(pcie, 2, 0x70c); - printk("Port 2 N_FTS = %x\n", (unsigned int)val); + list_for_each_entry_safe(port, tmp, &pcie->ports, list) { + u32 slot = port->slot; + val = read_config(pcie, slot, 0x70c); + dev_info(dev, "Port %d N_FTS = %x\n", (unsigned int)val, slot); + } rt_sysc_m32(0, RALINK_PCIE_RST, RALINK_RSTCTRL); rt_sysc_m32(0x30, 2 << 4, SYSC_REG_SYSTEM_CONFIG1); |