From: Philipp Zabel
Date: Mon, 5 Nov 2018 15:25:08 +0000 (-0500)
Subject: media: coda: never set infinite timeperframe
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=cf13135cf593439ebae0db6d8177e8af0fc3a945;p=openwrt%2Fstaging%2Fblogic.git
media: coda: never set infinite timeperframe
v4l2-compliance complains if G_PARM returns 0 in the denominator.
Signed-off-by: Philipp Zabel
Signed-off-by: Hans Verkuil
Signed-off-by: Mauro Carvalho Chehab
---
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index e342f1b64b61..fdea934af7ed 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1113,10 +1113,10 @@ static void coda_approximate_timeperframe(struct v4l2_fract *timeperframe)
return;
}
- /* Upper bound is 65536/1, map everything above to infinity */
+ /* Upper bound is 65536/1 */
if (s.denominator == 0 || s.numerator / s.denominator > 65536) {
- timeperframe->numerator = 1;
- timeperframe->denominator = 0;
+ timeperframe->numerator = 65536;
+ timeperframe->denominator = 1;
return;
}