@@ -1099,10 +1099,10 @@ static int v4l2_link_validate_get_streams(struct media_link *link,
{
static const u32 default_streams[] = { 0 };
struct v4l2_subdev_krouting *routing;
+ struct v4l2_subdev_route *route;
struct v4l2_subdev *subdev;
u32 num_streams;
u32 *streams;
- unsigned int i;
struct v4l2_subdev_state *state;
int ret;
@@ -1128,16 +1128,12 @@ static int v4l2_link_validate_get_streams(struct media_link *link,
num_streams = 0;
- for (i = 0; i < routing->num_routes; ++i) {
- struct v4l2_subdev_route *route = &routing->routes[i];
+ for_each_active_route(routing, route) {
int j;
u32 route_pad;
u32 route_stream;
u32 link_pad;
- if (!(route->flags & V4L2_SUBDEV_ROUTE_FL_ACTIVE))
- continue;
-
if (is_source) {
route_pad = route->source_pad;
route_stream = route->source_stream;
Use for_each_active_route() in v4l2_link_validate_get_streams(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> --- drivers/media/v4l2-core/v4l2-subdev.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)