diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/dm/device.h | 5 | ||||
-rw-r--r-- | include/pci.h | 2 | ||||
-rw-r--r-- | include/spi.h | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/include/dm/device.h b/include/dm/device.h index ed80ae44940..7ada7200e3d 100644 --- a/include/dm/device.h +++ b/include/dm/device.h @@ -182,6 +182,11 @@ static inline bool dev_has_of_node(struct udevice *dev) return ofnode_valid(dev->node); } +static inline int dev_seq(const struct udevice *dev) +{ + return dev->seq; +} + /** * struct udevice_id - Lists the compatible strings supported by a driver * @compatible: Compatible string diff --git a/include/pci.h b/include/pci.h index d5b42cee83c..5f36537b725 100644 --- a/include/pci.h +++ b/include/pci.h @@ -934,7 +934,7 @@ struct dm_pci_ops { * PCI buses must support reading and writing configuration values * so that the bus can be scanned and its devices configured. * - * Normally PCI_BUS(@bdf) is the same as @bus->seq, but not always. + * Normally PCI_BUS(@bdf) is the same as @dev_seq(bus), but not always. * If bridges exist it is possible to use the top-level bus to * access a sub-bus. In that case @bus will be the top-level bus * and PCI_BUS(bdf) will be a different (higher) value diff --git a/include/spi.h b/include/spi.h index 6b42b3e36ac..a0342e31695 100644 --- a/include/spi.h +++ b/include/spi.h @@ -116,7 +116,7 @@ enum spi_polarity { * claimed. * @bus: ID of the bus that the slave is attached to. For * driver model this is the sequence number of the SPI - * bus (bus->seq) so does not need to be stored + * bus (dev_seq(bus)) so does not need to be stored * @cs: ID of the chip select connected to the slave. * @mode: SPI mode to use for this slave (see SPI mode flags) * @wordlen: Size of SPI word in number of bits |