Merge tag 'media/v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media

Pull media fixes from Mauro Carvalho Chehab:
 "A couple of v4l2 core fixes:

   - fix a regression on strings control support

   - fix a regression for some drivers that depend on an odd streaming
     behavior"

* tag 'media/v6.2-3' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
  media: videobuf2: set q->streaming later
  media: v4l2-ctrls-api.c: move ctrl->is_new = 1 to the correct line
This commit is contained in:
Linus Torvalds
2023-01-31 11:17:38 -08:00
2 changed files with 3 additions and 4 deletions

View File

@@ -2149,8 +2149,6 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
if (ret)
return ret;
q->streaming = 1;
/*
* Tell driver to start streaming provided sufficient buffers
* are available.
@@ -2161,12 +2159,13 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
goto unprepare;
}
q->streaming = 1;
dprintk(q, 3, "successful\n");
return 0;
unprepare:
call_void_qop(q, unprepare_streaming, q);
q->streaming = 0;
return ret;
}
EXPORT_SYMBOL_GPL(vb2_core_streamon);

View File

@@ -150,8 +150,8 @@ static int user_to_new(struct v4l2_ext_control *c, struct v4l2_ctrl *ctrl)
* then return an error.
*/
if (strlen(ctrl->p_new.p_char) == ctrl->maximum && last)
ctrl->is_new = 1;
return -ERANGE;
ctrl->is_new = 1;
}
return ret;
default: