diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2015-06-10 07:45:45 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-06-10 15:01:16 +0200 |
commit | 95a86e43183eeeef72105372074f4ef127b27807 (patch) | |
tree | 21b0b47d8e8243a7816dc114ffef21edcea0e7a4 /drivers/media/pci/cobalt/cobalt-v4l2.c | |
parent | [media] rc: gpio-ir-recv: don't sleep in irq handler (diff) | |
download | linux-95a86e43183eeeef72105372074f4ef127b27807.tar.xz linux-95a86e43183eeeef72105372074f4ef127b27807.zip |
[media] cobalt: fix 64-bit division
There are still some 64-bit division problems in the cobalt code.
Replace it by div_u64.
[mchehab@osg.samsung.com: folded with an additional diff sent by
Hans via a priv e-mail]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cobalt/cobalt-v4l2.c')
-rw-r--r-- | drivers/media/pci/cobalt/cobalt-v4l2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c index 6fb8812990f4..b40c2d141b58 100644 --- a/drivers/media/pci/cobalt/cobalt-v4l2.c +++ b/drivers/media/pci/cobalt/cobalt-v4l2.c @@ -327,7 +327,7 @@ static int cobalt_start_streaming(struct vb2_queue *q, unsigned int count) iowrite32(clk_freq / 1000000, &clkloss->ref_clk_cnt_val); /* The lower bound for the clock frequency is 0.5% lower as is * allowed by the spec */ - iowrite32((((u64)bt->pixelclock * 995) / 1000) / 1000000, + iowrite32(div_u64(bt->pixelclock * 995, 1000000000), &clkloss->test_clk_cnt_val); /* will be enabled after the first frame has been received */ iowrite32(bt->width * bt->height, &fw->active_length); |