From 9ff889b612ae3c36a537b8f023dd0201412de87f Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Fri, 17 May 2013 07:31:04 -0300 Subject: [PATCH] [media] v4l: of: Return an int in v4l2_of_parse_endpoint() When CONFIG_OF is not defined the v4l2_of_parse_endpoint() function is defined as a stub that returns -ENOSYS. Make the real function return an integer as well to be able to differentiate between the two cases. Signed-off-by: Laurent Pinchart Acked-by: Sylwester Nawrocki Signed-off-by: Mauro Carvalho Chehab --- drivers/media/v4l2-core/v4l2-of.c | 8 ++++++-- include/media/v4l2-of.h | 4 ++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-of.c b/drivers/media/v4l2-core/v4l2-of.c index a6478dca0cde..66a0e2337184 100644 --- a/drivers/media/v4l2-core/v4l2-of.c +++ b/drivers/media/v4l2-core/v4l2-of.c @@ -121,9 +121,11 @@ static void v4l2_of_parse_parallel_bus(const struct device_node *node, * the bus as serial CSI-2 and clock-noncontinuous isn't set, we set the * V4L2_MBUS_CSI2_CONTINUOUS_CLOCK flag. * The caller should hold a reference to @node. + * + * Return: 0. */ -void v4l2_of_parse_endpoint(const struct device_node *node, - struct v4l2_of_endpoint *endpoint) +int v4l2_of_parse_endpoint(const struct device_node *node, + struct v4l2_of_endpoint *endpoint) { struct device_node *port_node = of_get_parent(node); @@ -146,6 +148,8 @@ void v4l2_of_parse_endpoint(const struct device_node *node, v4l2_of_parse_parallel_bus(node, endpoint); of_node_put(port_node); + + return 0; } EXPORT_SYMBOL(v4l2_of_parse_endpoint); diff --git a/include/media/v4l2-of.h b/include/media/v4l2-of.h index 3a8a84124b44..3480cd00d5c1 100644 --- a/include/media/v4l2-of.h +++ b/include/media/v4l2-of.h @@ -72,8 +72,8 @@ struct v4l2_of_endpoint { }; #ifdef CONFIG_OF -void v4l2_of_parse_endpoint(const struct device_node *node, - struct v4l2_of_endpoint *link); +int v4l2_of_parse_endpoint(const struct device_node *node, + struct v4l2_of_endpoint *endpoint); struct device_node *v4l2_of_get_next_endpoint(const struct device_node *parent, struct device_node *previous); struct device_node *v4l2_of_get_remote_port_parent( -- 2.39.5