
From: Simon Glass <sjg@chromium.org> The existing name is confusing as this function relates to the devicetree rather than the device itself. Rename it to include the word 'read' like other functions in this API. Signed-off-by: Simon Glass <sjg@chromium.org> --- drivers/adc/stm32-adc.c | 2 +- drivers/core/read.c | 2 +- drivers/phy/phy-mtk-tphy.c | 2 +- include/dm/read.h | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/adc/stm32-adc.c b/drivers/adc/stm32-adc.c index d50f00f1233..609ed36d7e4 100644 --- a/drivers/adc/stm32-adc.c +++ b/drivers/adc/stm32-adc.c @@ -318,7 +318,7 @@ static int stm32_adc_chan_of_init(struct udevice *dev) int ret; bool legacy = false; - num_channels = dev_get_child_count(dev); + num_channels = dev_read_child_count(dev); /* If no channels have been found, fallback to channels legacy properties. */ if (!num_channels) { legacy = true; diff --git a/drivers/core/read.c b/drivers/core/read.c index 55c19f335ae..08aa3e0981a 100644 --- a/drivers/core/read.c +++ b/drivers/core/read.c @@ -438,7 +438,7 @@ fdt_addr_t dev_read_addr_pci(const struct udevice *dev, fdt_size_t *sizep) return addr; } -int dev_get_child_count(const struct udevice *dev) +int dev_read_child_count(const struct udevice *dev) { return ofnode_get_child_count(dev_ofnode(dev)); } diff --git a/drivers/phy/phy-mtk-tphy.c b/drivers/phy/phy-mtk-tphy.c index 0a45dc58629..7b9d1212655 100644 --- a/drivers/phy/phy-mtk-tphy.c +++ b/drivers/phy/phy-mtk-tphy.c @@ -840,7 +840,7 @@ static int mtk_tphy_probe(struct udevice *dev) ofnode subnode; int index = 0; - tphy->nphys = dev_get_child_count(dev); + tphy->nphys = dev_read_child_count(dev); tphy->phys = devm_kcalloc(dev, tphy->nphys, sizeof(*tphy->phys), GFP_KERNEL); diff --git a/include/dm/read.h b/include/dm/read.h index 894bc698bb4..5ba25b919f9 100644 --- a/include/dm/read.h +++ b/include/dm/read.h @@ -786,12 +786,12 @@ int dev_get_dma_range(const struct udevice *dev, phys_addr_t *cpu, int dev_read_alias_highest_id(const char *stem); /** - * dev_get_child_count() - get the child count of a device + * dev_read_child_count() - get the child count of a device * * @dev: device to use for interation (`struct udevice *`) * Return: the count of child subnode */ -int dev_get_child_count(const struct udevice *dev); +int dev_read_child_count(const struct udevice *dev); /** * dev_read_pci_bus_range - Read PCI bus-range resource @@ -1243,7 +1243,7 @@ static inline int dev_read_alias_highest_id(const char *stem) return fdtdec_get_alias_highest_id(gd->fdt_blob, stem); } -static inline int dev_get_child_count(const struct udevice *dev) +static inline int dev_read_child_count(const struct udevice *dev) { return ofnode_get_child_count(dev_ofnode(dev)); } -- 2.43.0