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/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index fcaf2ba..c5e8e2a 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -511,7 +511,7 @@
DSPI_MCR_CRXF | DSPI_MCR_CTXF;
fsl_dspi_init_mcr(priv, mcr_cfg_val);
- debug("%s probe done, bus-num %d.\n", bus->name, bus->seq);
+ debug("%s probe done, bus-num %d.\n", bus->name, dev_seq(bus));
return 0;
}
@@ -527,7 +527,7 @@
priv = dev_get_priv(bus);
/* processor special preparation work */
- cpu_dspi_claim_bus(bus->seq, slave_plat->cs);
+ cpu_dspi_claim_bus(dev_seq(bus), slave_plat->cs);
/* configure transfer mode */
fsl_dspi_cfg_ctar_mode(priv, slave_plat->cs, priv->mode);
@@ -559,7 +559,7 @@
dspi_halt(priv, 1);
/* processor special release work */
- cpu_dspi_release_bus(bus->seq, slave_plat->cs);
+ cpu_dspi_release_bus(dev_seq(bus), slave_plat->cs);
return 0;
}