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

Commit eb3c311c authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab
Browse files

[media] soc-camera: Use new selection target definitions



Replace the deprecated V4L2_SEL_TGT_*_ACTIVE selection target
names with their new unified counterparts.
Compatibility definitions are already in linux/v4l2-common.h.

Signed-off-by: default avatarSylwester Nawrocki <sylvester.nawrocki@gmail.com>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent cb9e40fc
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -950,11 +950,11 @@ static int soc_camera_s_selection(struct file *file, void *fh,

	/* In all these cases cropping emulation will not help */
	if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE ||
	    (s->target != V4L2_SEL_TGT_COMPOSE_ACTIVE &&
	     s->target != V4L2_SEL_TGT_CROP_ACTIVE))
	    (s->target != V4L2_SEL_TGT_COMPOSE &&
	     s->target != V4L2_SEL_TGT_CROP))
		return -EINVAL;

	if (s->target == V4L2_SEL_TGT_COMPOSE_ACTIVE) {
	if (s->target == V4L2_SEL_TGT_COMPOSE) {
		/* No output size change during a running capture! */
		if (is_streaming(ici, icd) &&
		    (icd->user_width != s->r.width ||
@@ -974,7 +974,7 @@ static int soc_camera_s_selection(struct file *file, void *fh,

	ret = ici->ops->set_selection(icd, s);
	if (!ret &&
	    s->target == V4L2_SEL_TGT_COMPOSE_ACTIVE) {
	    s->target == V4L2_SEL_TGT_COMPOSE) {
		icd->user_width = s->r.width;
		icd->user_height = s->r.height;
		if (!icd->streamer)