diff options
| author | Simon Glass <[email protected]> | 2020-12-16 21:20:07 -0700 |
|---|---|---|
| committer | Simon Glass <[email protected]> | 2020-12-18 20:32:21 -0700 |
| commit | 8b85dfc675f12de8d04126c07f3c796965b990c2 (patch) | |
| tree | 9b8d6df956b02734a1b910b0a4c072e1e80b672a /cmd/i2c.c | |
| parent | 0b2fa98aa5e5dbdac4f5e2b2f67a34cc34dcc6b8 (diff) | |
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 <[email protected]>
Diffstat (limited to 'cmd/i2c.c')
| -rw-r--r-- | cmd/i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/i2c.c b/cmd/i2c.c index dc4b66da202..ac384550016 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 |
