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_gen4.c b/drivers/pci/pcie_layerscape_gen4.c
index a855646..62bfbd9 100644
--- a/drivers/pci/pcie_layerscape_gen4.c
+++ b/drivers/pci/pcie_layerscape_gen4.c
@@ -191,13 +191,13 @@
 	if (!pcie->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_g4_link_up(pcie)))
+	if ((PCI_BUS(bdf) > dev_seq(bus)) && (!ls_pcie_g4_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;
@@ -209,7 +209,7 @@
 	struct udevice *bus = pcie->bus;
 	u32 target;
 
-	if (PCI_BUS(bdf) == bus->seq) {
+	if (PCI_BUS(bdf) == dev_seq(bus)) {
 		if (offset < INDIRECT_ADDR_BNDRY) {
 			ccsr_set_page(pcie, 0);
 			return pcie->ccsr + offset;
@@ -219,7 +219,7 @@
 		return pcie->ccsr + OFFSET_TO_PAGE_ADDR(offset);
 	}
 
-	target = PAB_TARGET_BUS(PCI_BUS(bdf) - bus->seq) |
+	target = PAB_TARGET_BUS(PCI_BUS(bdf) - dev_seq(bus)) |
 		 PAB_TARGET_DEV(PCI_DEV(bdf)) |
 		 PAB_TARGET_FUNC(PCI_FUNC(bdf));