aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/fc2580.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-05-21 19:01:08 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2014-05-21 19:01:08 +0900
commitfba69f042ad99f68c0268ef1c012f3199f898fac (patch)
treea64ff64b909e0c239858f3fd1d8ccaa00d010e99 /drivers/media/tuners/fc2580.c
parentMerge tag 'staging-3.15-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging (diff)
parent[media] V4L2: fix VIDIOC_CREATE_BUFS in 64- / 32-bit compatibility mode (diff)
downloadlinux-dev-fba69f042ad99f68c0268ef1c012f3199f898fac.tar.xz
linux-dev-fba69f042ad99f68c0268ef1c012f3199f898fac.zip
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media fixes from Mauro Carvalho Chehab: "Most of the changes are drivers fixes (rtl28xuu, fc2580, ov7670, davinci, gspca, s5p-fimc and s5c73m3). There is also a compat32 fix and one infoleak fixup at the media controller" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: [media] V4L2: fix VIDIOC_CREATE_BUFS in 64- / 32-bit compatibility mode [media] V4L2: ov7670: fix a wrong index, potentially Oopsing the kernel from user-space [media] media-device: fix infoleak in ioctl media_enum_entities() [media] fc2580: fix tuning failure on 32-bit arch [media] Prefer gspca_sonixb over sn9c102 for all devices [media] media: davinci: vpfe: make sure all the buffers unmapped and released [media] staging: media: davinci: vpfe: make sure all the buffers are released [media] media: davinci: vpbe_display: fix releasing of active buffers [media] media: davinci: vpif_display: fix releasing of active buffers [media] media: davinci: vpif_capture: fix releasing of active buffers [media] s5p-fimc: Fix YUV422P depth [media] s5c73m3: Add missing rename of v4l2_of_get_next_endpoint() function [media] rtl28xxu: silence error log about disabled rtl2832_sdr module [media] rtl28xxu: do not hard depend on staging SDR module
Diffstat (limited to 'drivers/media/tuners/fc2580.c')
-rw-r--r--drivers/media/tuners/fc2580.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/tuners/fc2580.c b/drivers/media/tuners/fc2580.c
index 3aecaf465094..f0c9c42867de 100644
--- a/drivers/media/tuners/fc2580.c
+++ b/drivers/media/tuners/fc2580.c
@@ -195,7 +195,7 @@ static int fc2580_set_params(struct dvb_frontend *fe)
f_ref = 2UL * priv->cfg->clock / r_val;
n_val = div_u64_rem(f_vco, f_ref, &k_val);
- k_val_reg = 1UL * k_val * (1 << 20) / f_ref;
+ k_val_reg = div_u64(1ULL * k_val * (1 << 20), f_ref);
ret = fc2580_wr_reg(priv, 0x18, r18_val | ((k_val_reg >> 16) & 0xff));
if (ret < 0)
@@ -348,8 +348,8 @@ static int fc2580_set_params(struct dvb_frontend *fe)
if (ret < 0)
goto err;
- ret = fc2580_wr_reg(priv, 0x37, 1UL * priv->cfg->clock * \
- fc2580_if_filter_lut[i].mul / 1000000000);
+ ret = fc2580_wr_reg(priv, 0x37, div_u64(1ULL * priv->cfg->clock *
+ fc2580_if_filter_lut[i].mul, 1000000000));
if (ret < 0)
goto err;