summaryrefslogtreecommitdiff
path: root/cmd/pci.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/pci.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/pci.c')
-rw-r--r--cmd/pci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmd/pci.c b/cmd/pci.c
index 2295cc5e8e..e53b7c858c 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);
}