diff options
author | Simon Glass <sjg@chromium.org> | 2020-12-17 07:20:07 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2020-12-19 06:32:21 +0300 |
commit | 8b85dfc675f12de8d04126c07f3c796965b990c2 (patch) | |
tree | 9b8d6df956b02734a1b910b0a4c072e1e80b672a /drivers/mtd | |
parent | 0b2fa98aa5e5dbdac4f5e2b2f67a34cc34dcc6b8 (diff) | |
download | u-boot-8b85dfc675f12de8d04126c07f3c796965b990c2.tar.xz |
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/spi/sandbox.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c index 740bd7541c..3c01e3b41c 100644 --- a/drivers/mtd/spi/sandbox.c +++ b/drivers/mtd/spi/sandbox.c @@ -131,7 +131,7 @@ static int sandbox_sf_probe(struct udevice *dev) int ret = 0; int cs = -1; - debug("%s: bus %d, looking for emul=%p: ", __func__, bus->seq, dev); + debug("%s: bus %d, looking for emul=%p: ", __func__, dev_seq(bus), dev); ret = sandbox_spi_get_emul(state, bus, dev, &emul); if (ret) { printf("Error: Unknown chip select for device '%s'\n", @@ -565,7 +565,7 @@ int sandbox_spi_get_emul(struct sandbox_state *state, struct udevice **emulp) { struct sandbox_spi_info *info; - int busnum = bus->seq; + int busnum = dev_seq(bus); int cs = spi_chip_select(slave); int ret; |