From: Niklas Söderlund Date: Wed, 24 May 2017 00:15:24 +0000 (-0300) Subject: [media] rcar-vin: reset bytesperline and sizeimage when resetting format X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6afaaab06a47f605424f1cbbcf10159fafdc12a8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [media] rcar-vin: reset bytesperline and sizeimage when resetting format These two were forgotten when refactoring the format reset code. If they are not also reset at the same time as width and height the format returned from G_FMT will not match reality. Signed-off-by: Niklas Söderlund Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c index 2bbe6d495fa6..69bc4cfea6a8 100644 --- a/drivers/media/platform/rcar-vin/rcar-v4l2.c +++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c @@ -151,6 +151,9 @@ static int rvin_reset_format(struct rvin_dev *vin) rvin_reset_crop_compose(vin); + vin->format.bytesperline = rvin_format_bytesperline(&vin->format); + vin->format.sizeimage = rvin_format_sizeimage(&vin->format); + return 0; }