On Sun, Aug 12, 2018 at 08:45:56PM +0200, Sergio Paracuellos wrote:
> diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c
> b/drivers/staging/mt7621-pci/pci-mt7621.c
> index ec1d822..f499c108 100644
> --- a/drivers/staging/mt7621-pci/pci-mt7621.c
> +++ b/drivers/staging/mt7621-pci/pci-mt7621.c
> @@ -568,14 +568,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);
> + }
We don't need to use the _safe version, unless it's doing something
truely devious that I can't see.
regards,
dan carpenter
_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel