summaryrefslogtreecommitdiff
path: root/cmd/i2c.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-12-17 07:20:07 +0300
committerSimon Glass <sjg@chromium.org>2020-12-19 06:32:21 +0300
commit8b85dfc675f12de8d04126c07f3c796965b990c2 (patch)
tree9b8d6df956b02734a1b910b0a4c072e1e80b672a /cmd/i2c.c
parent0b2fa98aa5e5dbdac4f5e2b2f67a34cc34dcc6b8 (diff)
downloadu-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 'cmd/i2c.c')
-rw-r--r--cmd/i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/i2c.c b/cmd/i2c.c
index dc4b66da20..ac38455001 100644
--- a/cmd/i2c.c
+++ b/cmd/i2c.c
@@ -1702,7 +1702,7 @@ static void show_bus(struct udevice *bus)
printf("Bus %d:\t%s", bus->req_seq, bus->name);
if (device_active(bus))
- printf(" (active %d)", bus->seq);
+ printf(" (active %d)", dev_seq(bus));
printf("\n");
for (device_find_first_child(bus, &dev);
dev;
@@ -1825,7 +1825,7 @@ static int do_i2c_bus_num(struct cmd_tbl *cmdtp, int flag, int argc,
struct udevice *bus;
if (!i2c_get_cur_bus(&bus))
- bus_no = bus->seq;
+ bus_no = dev_seq(bus);
else
bus_no = -1;
#else