Commit 57484905 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Rob Herring

of: property: use unsigned int return on of_graph_get_endpoint_count()

Because of of_graph_get_endpoint_count() doesn't report error,
just return count of endpoint, the return type should be unsigned.
Tidyup it.
Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Link: https://lore.kernel.org/r/87plxbcvzb.wl-kuninori.morimoto.gx@renesas.comSigned-off-by: default avatarRob Herring <robh@kernel.org>
parent 4c3b386c
......@@ -818,10 +818,10 @@ EXPORT_SYMBOL(of_graph_get_remote_port);
*
* Return: count of endpoint of this device node
*/
int of_graph_get_endpoint_count(const struct device_node *np)
unsigned int of_graph_get_endpoint_count(const struct device_node *np)
{
struct device_node *endpoint;
int num = 0;
unsigned int num = 0;
for_each_endpoint_of_node(np, endpoint)
num++;
......
......@@ -41,7 +41,7 @@ struct of_endpoint {
bool of_graph_is_present(const struct device_node *node);
int of_graph_parse_endpoint(const struct device_node *node,
struct of_endpoint *endpoint);
int of_graph_get_endpoint_count(const struct device_node *np);
unsigned int of_graph_get_endpoint_count(const struct device_node *np);
struct device_node *of_graph_get_port_by_id(struct device_node *node, u32 id);
struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
struct device_node *previous);
......@@ -68,7 +68,7 @@ static inline int of_graph_parse_endpoint(const struct device_node *node,
return -ENOSYS;
}
static inline int of_graph_get_endpoint_count(const struct device_node *np)
static inline unsigned int of_graph_get_endpoint_count(const struct device_node *np)
{
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment