Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9ff889b6 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

[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: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 792e8eca
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -121,8 +121,10 @@ 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,
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);

+2 −2
Original line number Diff line number Diff line
@@ -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(