Commit 35111f5b authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] msi3101: fix overflow in freq setting

Higher frequencies were not possible to set correctly as that value
overflows.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent c5a431d0
...@@ -1507,11 +1507,11 @@ static int vidioc_s_frequency(struct file *file, void *priv, ...@@ -1507,11 +1507,11 @@ static int vidioc_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f) const struct v4l2_frequency *f)
{ {
struct msi3101_state *s = video_drvdata(file); struct msi3101_state *s = video_drvdata(file);
dev_dbg(&s->udev->dev, "%s: frequency=%u Hz (%d)\n", dev_dbg(&s->udev->dev, "%s: frequency=%lu Hz (%u)\n",
__func__, f->frequency * 625U / 10U, f->frequency); __func__, f->frequency * 625UL / 10UL, f->frequency);
return v4l2_ctrl_s_ctrl_int64(s->ctrl_tuner_rf, return v4l2_ctrl_s_ctrl_int64(s->ctrl_tuner_rf,
f->frequency * 625U / 10U); f->frequency * 625UL / 10UL);
} }
const struct v4l2_ioctl_ops msi3101_ioctl_ops = { const struct v4l2_ioctl_ops msi3101_ioctl_ops = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment