dm: Avoid accessing seq directly

At present various drivers etc. access the device's 'seq' member directly.
This makes it harder to change the meaning of that member. Change access
to go through a function instead.

The drivers/i2c/lpc32xx_i2c.c file is left unchanged for now.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/pci/pcie_layerscape_rc.c b/drivers/pci/pcie_layerscape_rc.c
index 61b1059..c4e6099 100644
--- a/drivers/pci/pcie_layerscape_rc.c
+++ b/drivers/pci/pcie_layerscape_rc.c
@@ -130,13 +130,13 @@
 	if (!pcie_rc->enabled)
 		return -ENXIO;
 
-	if (PCI_BUS(bdf) < bus->seq)
+	if (PCI_BUS(bdf) < dev_seq(bus))
 		return -EINVAL;
 
-	if ((PCI_BUS(bdf) > bus->seq) && (!ls_pcie_link_up(pcie)))
+	if ((PCI_BUS(bdf) > dev_seq(bus)) && (!ls_pcie_link_up(pcie)))
 		return -EINVAL;
 
-	if (PCI_BUS(bdf) <= (bus->seq + 1) && (PCI_DEV(bdf) > 0))
+	if (PCI_BUS(bdf) <= (dev_seq(bus) + 1) && (PCI_DEV(bdf) > 0))
 		return -EINVAL;
 
 	return 0;
@@ -152,16 +152,16 @@
 	if (ls_pcie_addr_valid(pcie_rc, bdf))
 		return -EINVAL;
 
-	if (PCI_BUS(bdf) == bus->seq) {
+	if (PCI_BUS(bdf) == dev_seq(bus)) {
 		*paddress = pcie->dbi + offset;
 		return 0;
 	}
 
-	busdev = PCIE_ATU_BUS(PCI_BUS(bdf) - bus->seq) |
+	busdev = PCIE_ATU_BUS(PCI_BUS(bdf) - dev_seq(bus)) |
 		 PCIE_ATU_DEV(PCI_DEV(bdf)) |
 		 PCIE_ATU_FUNC(PCI_FUNC(bdf));
 
-	if (PCI_BUS(bdf) == bus->seq + 1) {
+	if (PCI_BUS(bdf) == dev_seq(bus) + 1) {
 		ls_pcie_cfg0_set_busdev(pcie_rc, busdev);
 		*paddress = pcie_rc->cfg0 + offset;
 	} else {