Re: [PATCH v2 2/4] of: add __of_get_next_status_child() and makes more generic of_get_next

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Nov 21, 2023 at 02:05:30AM +0000, Kuninori Morimoto wrote:
> Linux Kernel has of_get_next_available_child().
> Add more generic __of_get_next_status_child() to enable to use same
> logic for other status.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
> Tested-by: Yusuke Goda <yusuke.goda.sx@xxxxxxxxxxx>
> ---
>  drivers/of/base.c | 29 ++++++++++++++++++-----------
>  1 file changed, 18 insertions(+), 11 deletions(-)
> 
> diff --git a/drivers/of/base.c b/drivers/of/base.c
> index 3cb467a7e747..d0f7e7c890f1 100644
> --- a/drivers/of/base.c
> +++ b/drivers/of/base.c
> @@ -612,16 +612,9 @@ struct device_node *of_get_next_child(const struct device_node *node,
>  }
>  EXPORT_SYMBOL(of_get_next_child);
>  
> -/**
> - * of_get_next_available_child - Find the next available child node
> - * @node:	parent node
> - * @prev:	previous child of the parent node, or NULL to get first
> - *
> - * This function is like of_get_next_child(), except that it
> - * automatically skips any disabled nodes (i.e. status = "disabled").
> - */
> -struct device_node *of_get_next_available_child(const struct device_node *node,
> -	struct device_node *prev)
> +static struct device_node *__of_get_next_status_child(const struct device_node *node,

'__' means the lock should already be held, not that it is an internal 
function.

With that dropped,

Reviewed-by: Rob Herring <robh@xxxxxxxxxx>




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux