• Janusz Krzysztofik's avatar
    media: ov6650: Fix crop rectangle alignment not passed back · 7b188d6b
    Janusz Krzysztofik authored
    Commit 4f996594 ("[media] v4l2: make vidioc_s_crop const")
    introduced a writable copy of constified user requested crop rectangle
    in order to be able to perform hardware alignments on it.  Later
    on, commit 10d5509c ("[media] v4l2: remove g/s_crop from video
    ops") replaced s_crop() video operation using that const argument with
    set_selection() pad operation which had a corresponding argument not
    constified, however the original behavior of the driver was not
    restored.  Since that time, any hardware alignment applied on a user
    requested crop rectangle is not passed back to the user calling
    .set_selection() as it should be.
    
    Fix the issue by dropping the copy and replacing all references to it
    with references to the crop rectangle embedded in the user argument.
    
    Fixes: 10d5509c ("[media] v4l2: remove g/s_crop from video ops")
    Signed-off-by: default avatarJanusz Krzysztofik <jmkrzyszt@gmail.com>
    Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
    7b188d6b
ov6650.c 26.4 KB