diff mbox

[v5,02/22] fixup! v4l2-ctrls: add v4l2_ctrl_request_hdl_find/put/ctrl_find functions

Message ID 20180710080114.31469-3-paul.kocialkowski@bootlin.com (mailing list archive)
State New, archived
Headers show

Commit Message

Paul Kocialkowski July 10, 2018, 8 a.m. UTC
---
 drivers/media/v4l2-core/v4l2-ctrls.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Geert Uytterhoeven July 10, 2018, 8:07 a.m. UTC | #1
On Tue, Jul 10, 2018 at 10:02 AM Paul Kocialkowski
<paul.kocialkowski@bootlin.com> wrote:
> [PATCH v5 02/22] fixup! v4l2-ctrls: add v4l2_ctrl_request_hdl_find/put/ctrl_find functions

git rebase -i ;-)

Gr{oetje,eeting}s,

                        Geert
Paul Kocialkowski July 10, 2018, 8:13 a.m. UTC | #2
Hi,

On Tue, 2018-07-10 at 10:07 +0200, Geert Uytterhoeven wrote:
> On Tue, Jul 10, 2018 at 10:02 AM Paul Kocialkowski
> <paul.kocialkowski@bootlin.com> wrote:
> > [PATCH v5 02/22] fixup! v4l2-ctrls: add v4l2_ctrl_request_hdl_find/put/ctrl_find functions
> 
> git rebase -i ;-)

Although I should have mentionned it (and did not), this is totally
intentional! The first patch (from Hans Verkuil) requires said fixup to
work properly. I didn't want to squash that change into the commit to
make the diff obvious.

Ultimately, this framework patch is not really part of the series but is
one of its underlying requirements, that should be merged separately (as
part of the requests API series).

I hope this clears up some of the confusion about this patch :)

Cheers!

> Gr{oetje,eeting}s,
> 
>                         Geert
>
Hans Verkuil July 10, 2018, 8:17 a.m. UTC | #3
On 10/07/18 10:13, Paul Kocialkowski wrote:
> Hi,
> 
> On Tue, 2018-07-10 at 10:07 +0200, Geert Uytterhoeven wrote:
>> On Tue, Jul 10, 2018 at 10:02 AM Paul Kocialkowski
>> <paul.kocialkowski@bootlin.com> wrote:
>>> [PATCH v5 02/22] fixup! v4l2-ctrls: add v4l2_ctrl_request_hdl_find/put/ctrl_find functions
>>
>> git rebase -i ;-)
> 
> Although I should have mentionned it (and did not), this is totally
> intentional! The first patch (from Hans Verkuil) requires said fixup to
> work properly. I didn't want to squash that change into the commit to
> make the diff obvious.

Just squash the two for the next version you post.

> Ultimately, this framework patch is not really part of the series but is
> one of its underlying requirements, that should be merged separately (as
> part of the requests API series).

There is a good chance that this patch will go in via your series anyway
since it is not needed by vivid or vim2m.

Regards,

	Hans

> 
> I hope this clears up some of the confusion about this patch :)
> 
> Cheers!
> 
>> Gr{oetje,eeting}s,
>>
>>                         Geert
>>
Paul Kocialkowski July 10, 2018, 8:21 a.m. UTC | #4
Hi,

On Tue, 2018-07-10 at 10:17 +0200, Hans Verkuil wrote:
> On 10/07/18 10:13, Paul Kocialkowski wrote:
> > Hi,
> > 
> > On Tue, 2018-07-10 at 10:07 +0200, Geert Uytterhoeven wrote:
> > > On Tue, Jul 10, 2018 at 10:02 AM Paul Kocialkowski
> > > <paul.kocialkowski@bootlin.com> wrote:
> > > > [PATCH v5 02/22] fixup! v4l2-ctrls: add v4l2_ctrl_request_hdl_find/put/ctrl_find functions
> > > 
> > > git rebase -i ;-)
> > 
> > Although I should have mentionned it (and did not), this is totally
> > intentional! The first patch (from Hans Verkuil) requires said fixup to
> > work properly. I didn't want to squash that change into the commit to
> > make the diff obvious.
> 
> Just squash the two for the next version you post.

That works for me! I must admit I was rather unsure this was a sensible
way to do things.

> > Ultimately, this framework patch is not really part of the series but is
> > one of its underlying requirements, that should be merged separately (as
> > part of the requests API series).
> 
> There is a good chance that this patch will go in via your series anyway
> since it is not needed by vivid or vim2m.

Alright, I will keep it around then.

Cheers,

Paul

> Regards,
> 
> 	Hans
> 
> > 
> > I hope this clears up some of the confusion about this patch :)
> > 
> > Cheers!
> > 
> > > Gr{oetje,eeting}s,
> > > 
> > >                         Geert
> > > 
> 
>
diff mbox

Patch

diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c
index 198b7e924d21..3610dce3a4f8 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls.c
@@ -2997,7 +2997,7 @@  v4l2_ctrl_request_hdl_ctrl_find(struct v4l2_ctrl_handler *hdl, u32 id)
 {
 	struct v4l2_ctrl_ref *ref = find_ref_lock(hdl, id);
 
-	return (ref && ref->req == ref) ? ref : NULL;
+	return (ref && ref->req == ref) ? ref->ctrl : NULL;
 }
 EXPORT_SYMBOL_GPL(v4l2_ctrl_request_hdl_ctrl_find);