diff options
author | Simon Glass | 2020-12-16 21:20:07 -0700 |
---|---|---|
committer | Simon Glass | 2020-12-18 20:32:21 -0700 |
commit | 8b85dfc675f12de8d04126c07f3c796965b990c2 (patch) | |
tree | 9b8d6df956b02734a1b910b0a4c072e1e80b672a /cmd/pci.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 <sjg@chromium.org>
Diffstat (limited to 'cmd/pci.c')
-rw-r--r-- | cmd/pci.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/pci.c b/cmd/pci.c index 2295cc5e8e8..e53b7c858c6 100644 --- a/cmd/pci.c +++ b/cmd/pci.c @@ -334,7 +334,7 @@ static void pciinfo(struct udevice *bus, bool short_listing) { struct udevice *dev; - pciinfo_header(bus->seq, short_listing); + pciinfo_header(dev_seq(bus), short_listing); for (device_find_first_child(bus, &dev); dev; @@ -343,11 +343,12 @@ static void pciinfo(struct udevice *bus, bool short_listing) pplat = dev_get_parent_plat(dev); if (short_listing) { - printf("%02x.%02x.%02x ", bus->seq, + printf("%02x.%02x.%02x ", dev_seq(bus), PCI_DEV(pplat->devfn), PCI_FUNC(pplat->devfn)); pci_header_show_brief(dev); } else { - printf("\nFound PCI device %02x.%02x.%02x:\n", bus->seq, + printf("\nFound PCI device %02x.%02x.%02x:\n", + dev_seq(bus), PCI_DEV(pplat->devfn), PCI_FUNC(pplat->devfn)); pci_header_show(dev); } |